From: Ali Alnubani <alialnu@nvidia.com>
To: David Marchand <david.marchand@redhat.com>, "ci@dpdk.org" <ci@dpdk.org>
Cc: "NBU-Contact-Thomas Monjalon (EXTERNAL)" <thomas@monjalon.net>,
"aconole@redhat.com" <aconole@redhat.com>
Subject: RE: [PATCH] tools: fix date parsing in patchwork polling
Date: Tue, 8 Apr 2025 18:42:20 +0000 [thread overview]
Message-ID: <PH7PR12MB917357B3C9E173814F7E34B5DAB52@PH7PR12MB9173.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20250331111926.3404719-1-david.marchand@redhat.com>
> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Monday, March 31, 2025 2:19 PM
> To: ci@dpdk.org
> Cc: NBU-Contact-Thomas Monjalon (EXTERNAL) <thomas@monjalon.net>;
> aconole@redhat.com; Ali Alnubani <alialnu@nvidia.com>
> Subject: [PATCH] tools: fix date parsing in patchwork polling
>
> Though it is not fully understood why (maybe some system upgrade..?),
> parsing date is now failing on some long running Debian system.
It's because the last date and time that were written to the file coincide with the Daylight-Saving Time transition.
That timestamp was invalid in the server's timezone.
>
> Specify date format earlier in the command line.
I think what fixed it was adding the --utc arg.
>
> Fixes: baaec1836189 ("tools: filter new patchwork IDs by date")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> tools/poll-pw | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/poll-pw b/tools/poll-pw
> index c1df012..4c7fafd 100755
> --- a/tools/poll-pw
> +++ b/tools/poll-pw
> @@ -47,7 +47,7 @@ if [ ! -f "$since_file" ] ; then
> exit 1
> fi
>
> -if ! date -d "$(cat $since_file | tr '\n' ' ')" >/dev/null 2>&1 ; then
> +if ! date --utc '+%FT%T' -d $(cat $since_file | tr '\n' ' ') >/dev/null 2>&1 ; then
> printf "The file '$since_file' doesn't contain a valid date format.\n\n" >&2
> exit 1
> fi
> @@ -77,7 +77,7 @@ callcmd () # <patchwork id>
>
> while true ; do
> date_now=$(date --utc '+%FT%T')
> - since=$(date -d $(cat $since_file | tr '\n' ' ') '+%FT%T')
> + since=$(date --utc '+%FT%T' -d $(cat $since_file | tr '\n' ' '))
> page=1
> while true ; do
> ids=$(curl -s "${URL}&page=${page}&since=${since}" |
> --
> 2.48.1
Thanks for addressing this, David.
Acked-by: Ali Alnubani <alialnu@nvidia.com>
- Ali
next prev parent reply other threads:[~2025-04-08 18:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-31 11:19 David Marchand
2025-04-08 18:42 ` Ali Alnubani [this message]
2025-04-14 18:41 ` Aaron Conole
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=PH7PR12MB917357B3C9E173814F7E34B5DAB52@PH7PR12MB9173.namprd12.prod.outlook.com \
--to=alialnu@nvidia.com \
--cc=aconole@redhat.com \
--cc=ci@dpdk.org \
--cc=david.marchand@redhat.com \
--cc=thomas@monjalon.net \
/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;
as well as URLs for NNTP newsgroup(s).