2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +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:
rudolfkoenig 2025-01-01 17:12:21 +00:00
parent 3741609235
commit 107784b661
2 changed files with 15 additions and 9 deletions

View File

@ -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

View File

@ -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 "<rect $attributes $lStyle x=\"$x1\" y=\"$y1\" ".
"width=\"$x2\" height=\"$y2\"/>";
}