[pmg-devel] [PATCH v3 pmg-log-tracker 1/5] rfc3339: move timezone offset compatibility code to old time parser

Dominik Csapak d.csapak at proxmox.com
Thu Feb 22 13:25:20 CET 2024


Gave this series a look & spin

code wise looks good imho

as mentioned off-list, we could fix the issue of the endtimes' offset
by adding the difference of offset of the end/start to the end cutoff
iff we encounter lines in the old format
(i.e. if the starttime was +1 and the endtime was +2, we have to
subtract +2 - +1 = 1 from the endtime for the old log format)

but that should not make too much difference in practice, as the
old log format was broken anyway in some circumstances

all in all i think this change is a net positive, since the time
returned by the log-tracker is now the "real" unix epoch
and we can drop the local timezone offset when we have the exact time
(which is most of the time now for current installations)

we probably should mention that the non exactly syslog format is
deprecated though and can create problems/confusion in the log tracker

tested with my local logs (no old format left sadly) and played around
with the test cases with the old format and found no issues

(how i hate handling time(zones) manually :P )




More information about the pmg-devel mailing list