[pmg-devel] [RFC pmg-log-tracker 0/2] fix rfc3339 output from logtracker

Stoiko Ivanov s.ivanov at proxmox.com
Tue Jun 27 21:46:48 CEST 2023


while upgrading a few systems we found a small glitch in the new timeformat
parsing: it did not account for the lack of timezone information in
the traditional syslog (which the API fixes up by subtracting its local
offset).
The mails were displayed in the log-tracker - but their times were UTC
(e.g. a mail from 19:37 was displayed at 17:37).

The 2 patches work around the issue as a stop-gap - by re-adding the offset
again to the parsed offset.
It seems like a better tradeoff than reworking the parsing of traditional
syslog format (which we want to drop soon anyways) - and adapting the API
(to trust the data from pmg-log-tracker)

Sending as RFC, because the code can benefit from some rework by people more
familiar with rust.

Stoiko Ivanov (2):
  rfc3339 timestamps: counter-offset timezone
  tests: update rfc3339 testoutput

 src/main.rs                          | 27 +++++++++++++++++++++++----
 tests/test_output_time_rfc3339_mixed | 20 ++++++++++----------
 2 files changed, 33 insertions(+), 14 deletions(-)

-- 
2.39.2





More information about the pmg-devel mailing list