From 107784b661e417d4b2815a78bb16efb1294f3eb4 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Wed, 1 Jan 2025 17:12:21 +0000 Subject: [PATCH] 92_FileLog.pm: fix fixedrange without timespec git-svn-id: https://svn.fhem.de/fhem/trunk@29467 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/92_FileLog.pm | 14 ++++++++++---- fhem/FHEM/98_SVG.pm | 10 +++++----- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/fhem/FHEM/92_FileLog.pm b/fhem/FHEM/92_FileLog.pm index d529d41d6..c19c81024 100644 --- a/fhem/FHEM/92_FileLog.pm +++ b/fhem/FHEM/92_FileLog.pm @@ -838,15 +838,21 @@ FileLog_Get($@) } else { my $linf; if($inf eq "CURRENT") { - if($from =~ m/^(....-..-..)_(..:..:..)/) { - my ($from_ymd, $from_hms) = ($1,$2); + my ($from_ymd, $from_hms); + if($from =~ m/^(....-..-..)$/ || + $from =~ m/^(....-..-..)_(..:..:..)/) { + + my $from_ymd = $1; + my $from_hms = $2 ? $2 : "00:00:00"; $linf = ResolveDateWildcards($hash->{logfile}, localtime(time_str2num("$from_ymd $from_hms"))); if(AttrVal($name, "createGluedFile", 0)) { $to = (split(" ", TimeNow()))[0] if($to eq "9"); # Special - if($to =~ m/^(....-..-..)_(..:..:..)/) { - my ($to_ymd, $to_hms) = ($1,$2); + if($to =~ m/^(....-..-..)$/ || + $to =~ m/^(....-..-..)_(..:..:..)/) { + my $to_ymd = $1; + my $to_hms = $2 ? $2 : "23:59:59"; my $linf_to = ResolveDateWildcards($hash->{logfile}, localtime(time_str2num("$to_ymd $to_hms"))); if($linf ne $linf_to){ # append each file into a temporary one diff --git a/fhem/FHEM/98_SVG.pm b/fhem/FHEM/98_SVG.pm index 1a588cf35..403e33834 100644 --- a/fhem/FHEM/98_SVG.pm +++ b/fhem/FHEM/98_SVG.pm @@ -2068,12 +2068,12 @@ SVG_render($$$$$$$$$$) foreach my $i (0..int(@{$dxp})-1) { my ($x1, $y1) = ( $x + $dxp->[$i] - $bw, $y +$h-($dyp->[$i]-$min)*$hmul); - my $curBw = $bw; - if($x1 < $x) { - $curBw -= $x - $x1; - $x1 = $x; + my $x2 = $bw; + if($x1 < $x) { # start is left of y-axis + $x2 -= $x - $x1; + $x1 = $x; } - my ($x2, $y2) = ($curBw, ($dyp->[$i]-$min)*$hmul); + my $y2 = ($dyp->[$i]-$min)*$hmul; SVG_pO ""; }