]> git.proxmox.com Git - pmg-log-tracker.git/commit
rfc3339: move timezone offset compatibility code to old time parser
authorMira Limbeck <m.limbeck@proxmox.com>
Tue, 20 Feb 2024 10:06:44 +0000 (11:06 +0100)
committerStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 23 Feb 2024 17:29:17 +0000 (18:29 +0100)
commit8a5b28ff16aecee717dde18ce25ff4a5ee6ef107
tree928be80a02aeb3f0970e61b9e9aae81ef1c63606
parente34f84b91f1c6341a0015b7bd9a905f9790d1880
rfc3339: move timezone offset compatibility code to old time parser

The compatibility code was added to the new rfc3339 code path temporarily so
that the old code path would not be changed before the PMG 8 release.

Now move it to the old time format code to make sure the rfc3339 code path
works as expected. Since we have all the information we need (year, month,
day, hours, minutes, seconds, timezone), there's no need for a workaround in
this code path.

As a side effect of parsing the time format `YYYY-MM-DD HH:MM:SS` in
localtime, it's now possible to parse an rfc3339 compliant format
(except for fractional seconds).

The change needs to be accompanied by one in pmg-api MailTracker.pmg to
keep the time displayed in the GUI the same for the old time format, and
correct for the new rfc3339 format.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
src/main.rs
src/time.rs