public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Mira Limbeck <m.limbeck@proxmox.com>, pmg-devel@lists.proxmox.com
Subject: [pmg-devel] applied-series: [PATCH v3 pmg-log-tracker 1/5] rfc3339: move timezone offset compatibility code to old time parser
Date: Tue, 27 Feb 2024 15:07:38 +0100	[thread overview]
Message-ID: <ecb66008-70cd-47c8-85f9-f77d1906435a@proxmox.com> (raw)
In-Reply-To: <20240220100648.44119-1-m.limbeck@proxmox.com>

Am 20/02/2024 um 11:06 schrieb Mira Limbeck:
> 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>
> ---
> I've tested it locally with both old timestamp format and new one, but
> running it on more logs would not hurt
> 
> Since we use only the start time to calculate the timezone offset, it
> will not be reliable in all cases, especially when the end time offset
> differs from the start time.
> 
> v3:
>  - changed file in range of start/end time check to use the start time
>    timezone offset, which allowed us to remove the timezone_offset
>    member of the parser struct
> 
> v2:
>  - removed TODO line
>  - fixed start-/endtime offset mentioned by @stoiko on the rfc
>  - added rfc3339 start-/endtime handling as suggested by @dominik since
>    it eases parsing the YYYY-MM-DD HH:MM:SS format as localtime rather
>    than UTC
>  - added tests in another patch
> 
>  src/main.rs | 65 ++++++++++++++++++++++++++++++-----------------------
>  src/time.rs | 23 ++++++++++++++++++-
>  2 files changed, 59 insertions(+), 29 deletions(-)
> 
>

For the record, this series has been applied yesterday by Stoiko, thanks!




      parent reply	other threads:[~2024-02-27 14:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20 10:06 [pmg-devel] " Mira Limbeck
2024-02-20 10:06 ` [pmg-devel] [PATCH v3 pmg-log-tracker 2/5] tests: improve test output consistency Mira Limbeck
2024-02-20 10:06 ` [pmg-devel] [PATCH v3 pmg-log-tracker 3/5] tests: update for log tracker time handling changes Mira Limbeck
2024-02-20 10:06 ` [pmg-devel] [PATCH v3 pmg-log-tracker 4/5] cleanup: remove unused strftime function Mira Limbeck
2024-02-20 10:06 ` [pmg-devel] [PATCH v3 pmg-log-tracker 5/5] cleanup: fix clippy warnings Mira Limbeck
2024-02-20 10:06 ` [pmg-devel] [PATCH v3 pmg-api] MailTracker: remove timezone offset Mira Limbeck
2024-02-22 12:25 ` [pmg-devel] [PATCH v3 pmg-log-tracker 1/5] rfc3339: move timezone offset compatibility code to old time parser Dominik Csapak
2024-02-27 14:07 ` Thomas Lamprecht [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ecb66008-70cd-47c8-85f9-f77d1906435a@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=m.limbeck@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal