mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-25 03:44:52 +00:00
92_FileLog.pm: fix fixedrange without timespec
git-svn-id: https://svn.fhem.de/fhem/trunk@29467 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
44e69f696b
commit
623be1ed02
@ -838,15 +838,21 @@ FileLog_Get($@)
|
|||||||
} else {
|
} else {
|
||||||
my $linf;
|
my $linf;
|
||||||
if($inf eq "CURRENT") {
|
if($inf eq "CURRENT") {
|
||||||
if($from =~ m/^(....-..-..)_(..:..:..)/) {
|
my ($from_ymd, $from_hms);
|
||||||
my ($from_ymd, $from_hms) = ($1,$2);
|
if($from =~ m/^(....-..-..)$/ ||
|
||||||
|
$from =~ m/^(....-..-..)_(..:..:..)/) {
|
||||||
|
|
||||||
|
my $from_ymd = $1;
|
||||||
|
my $from_hms = $2 ? $2 : "00:00:00";
|
||||||
$linf = ResolveDateWildcards($hash->{logfile},
|
$linf = ResolveDateWildcards($hash->{logfile},
|
||||||
localtime(time_str2num("$from_ymd $from_hms")));
|
localtime(time_str2num("$from_ymd $from_hms")));
|
||||||
|
|
||||||
if(AttrVal($name, "createGluedFile", 0)) {
|
if(AttrVal($name, "createGluedFile", 0)) {
|
||||||
$to = (split(" ", TimeNow()))[0] if($to eq "9"); # Special
|
$to = (split(" ", TimeNow()))[0] if($to eq "9"); # Special
|
||||||
if($to =~ m/^(....-..-..)_(..:..:..)/) {
|
if($to =~ m/^(....-..-..)$/ ||
|
||||||
my ($to_ymd, $to_hms) = ($1,$2);
|
$to =~ m/^(....-..-..)_(..:..:..)/) {
|
||||||
|
my $to_ymd = $1;
|
||||||
|
my $to_hms = $2 ? $2 : "23:59:59";
|
||||||
my $linf_to = ResolveDateWildcards($hash->{logfile},
|
my $linf_to = ResolveDateWildcards($hash->{logfile},
|
||||||
localtime(time_str2num("$to_ymd $to_hms")));
|
localtime(time_str2num("$to_ymd $to_hms")));
|
||||||
if($linf ne $linf_to){ # append each file into a temporary one
|
if($linf ne $linf_to){ # append each file into a temporary one
|
||||||
|
@ -2068,12 +2068,12 @@ SVG_render($$$$$$$$$$)
|
|||||||
foreach my $i (0..int(@{$dxp})-1) {
|
foreach my $i (0..int(@{$dxp})-1) {
|
||||||
my ($x1, $y1) = ( $x + $dxp->[$i] - $bw,
|
my ($x1, $y1) = ( $x + $dxp->[$i] - $bw,
|
||||||
$y +$h-($dyp->[$i]-$min)*$hmul);
|
$y +$h-($dyp->[$i]-$min)*$hmul);
|
||||||
my $curBw = $bw;
|
my $x2 = $bw;
|
||||||
if($x1 < $x) {
|
if($x1 < $x) { # start is left of y-axis
|
||||||
$curBw -= $x - $x1;
|
$x2 -= $x - $x1;
|
||||||
$x1 = $x;
|
$x1 = $x;
|
||||||
}
|
}
|
||||||
my ($x2, $y2) = ($curBw, ($dyp->[$i]-$min)*$hmul);
|
my $y2 = ($dyp->[$i]-$min)*$hmul;
|
||||||
SVG_pO "<rect $attributes $lStyle x=\"$x1\" y=\"$y1\" ".
|
SVG_pO "<rect $attributes $lStyle x=\"$x1\" y=\"$y1\" ".
|
||||||
"width=\"$x2\" height=\"$y2\"/>";
|
"width=\"$x2\" height=\"$y2\"/>";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user