GNU bug report logs -
#43828
invalid date converting from UTC, near DST
Previous Next
Reported by: "Martin Fido" <mart <at> fidolab.org>
Date: Tue, 6 Oct 2020 14:11:03 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43828 in the body.
You can then email your comments to 43828 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#43828
; Package
coreutils
.
(Tue, 06 Oct 2020 14:11:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Martin Fido" <mart <at> fidolab.org>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Tue, 06 Oct 2020 14:11:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
I seem to have found a bug in the date utility, converting from UTC to Sydney time. It returns invalid date for what should be perfectly valid:
$ TZ='Australia/Sydney' date -d '2020-10-04T02:00:00Z'
date: invalid date ‘2020-10-04T02:00:00Z’
$ TZ='Australia/Sydney' date -d '2020-10-04T02:59:59Z'
date: invalid date ‘2020-10-04T02:59:59Z’
Note DST in Sydney changed 10 hours earlier:
$ TZ='Australia/Sydney' date -d '2020-10-03T15:59:59Z'
Sunday 4 October 01:59:59 AEST 2020
$ TZ='Australia/Sydney' date -d '2020-10-03T16:00:00Z'
Sunday 4 October 03:00:00 AEDT 2020
I have version 8.25:
$ date --version
date (GNU coreutils) 8.25
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David MacKenzie.
Thanks,
Martin.
[Message part 2 (text/html, inline)]
Reply sent
to
Paul Eggert <eggert <at> cs.ucla.edu>
:
You have taken responsibility.
(Tue, 06 Oct 2020 17:29:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Martin Fido" <mart <at> fidolab.org>
:
bug acknowledged by developer.
(Tue, 06 Oct 2020 17:29:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 43828-done <at> debbugs.gnu.org (full text, mbox):
On 10/6/20 4:24 AM, Martin Fido wrote:
> I have version 8.25:
Seems to have been fixed by coreutils 8.30:
$ TZ='Australia/Sydney' date -d '2020-10-04T02:00:00Z'
Sun 04 Oct 2020 01:00:00 PM AEDT
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#43828
; Package
coreutils
.
(Fri, 16 Oct 2020 04:31:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 43828 <at> debbugs.gnu.org (full text, mbox):
Martin Fido wrote:
> I seem to have found a bug in the date utility, converting from UTC
> to Sydney time. It returns invalid date for what should be perfectly
> valid:
>
> $ TZ='Australia/Sydney' date -d '2020-10-04T02:00:00Z'
> date: invalid date ‘2020-10-04T02:00:00Z’
>
> $ TZ='Australia/Sydney' date -d '2020-10-04T02:59:59Z'
> date: invalid date ‘2020-10-04T02:59:59Z’
This is more likely to be in the tzdata zoneinfo database rather than
in date itself. Could you please report what version of tzdata you
have on your system? Current on my system is tzdata version 2020b-1.
And also this information too.
$ zdump -v Australia/Sydney | grep 2020
Australia/Sydney Sat Apr 4 15:59:59 2020 UT = Sun Apr 5 02:59:59 2020 AEDT isdst=1 gmtoff=39600
Australia/Sydney Sat Apr 4 16:00:00 2020 UT = Sun Apr 5 02:00:00 2020 AEST isdst=0 gmtoff=36000
Australia/Sydney Sat Oct 3 15:59:59 2020 UT = Sun Oct 4 01:59:59 2020 AEST isdst=0 gmtoff=36000
Australia/Sydney Sat Oct 3 16:00:00 2020 UT = Sun Oct 4 03:00:00 2020 AEDT isdst=1 gmtoff=39600
> Note DST in Sydney changed 10 hours earlier:
>
> $ TZ='Australia/Sydney' date -d '2020-10-03T15:59:59Z'
> Sunday 4 October 01:59:59 AEST 2020
>
> $ TZ='Australia/Sydney' date -d '2020-10-03T16:00:00Z'
> Sunday 4 October 03:00:00 AEDT 2020
Yes. And I think that is suspicious. Hopefully the zdump information
will show that database is in need of an update and that is the root
of the problem. I suspect that DST was moved at some point in time.
> I have version 8.25:
>
> $ date --version
> date (GNU coreutils) 8.25
I tried this on 8.13, 8.23, 8.26, and 8.32 and was unable to reproduce
the problem on any of those versions of date. But I suspect the root
cause is in the tzdata zoneinfo database.
Bob
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#43828
; Package
coreutils
.
(Fri, 16 Oct 2020 07:14:03 GMT)
Full text and
rfc822 format available.
Message #16 received at 43828 <at> debbugs.gnu.org (full text, mbox):
I have tzdata version 2020a:
$ apt-cache policy tzdata
tzdata:
Installed: 2020a-0ubuntu0.16.04
Candidate: 2020a-0ubuntu0.16.04
...
$ zdump -v Australia/Sydney | grep 2020
Australia/Sydney Sat Apr 4 15:59:59 2020 UT = Sun Apr 5 02:59:59 2020 AEDT isdst=1 gmtoff=39600
Australia/Sydney Sat Apr 4 16:00:00 2020 UT = Sun Apr 5 02:00:00 2020 AEST isdst=0 gmtoff=36000
Australia/Sydney Sat Oct 3 15:59:59 2020 UT = Sun Oct 4 01:59:59 2020 AEST isdst=0 gmtoff=36000
Australia/Sydney Sat Oct 3 16:00:00 2020 UT = Sun Oct 4 03:00:00 2020 AEDT isdst=1 gmtoff=39600
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#43828
; Package
coreutils
.
(Thu, 29 Oct 2020 05:11:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 43828 <at> debbugs.gnu.org (full text, mbox):
Martin Fido wrote:
> I have tzdata version 2020a:
>
> $ apt-cache policy tzdata
> tzdata:
> Installed: 2020a-0ubuntu0.16.04
> Candidate: 2020a-0ubuntu0.16.04
> ...
>
> $ zdump -v Australia/Sydney | grep 2020
> Australia/Sydney Sat Apr 4 15:59:59 2020 UT = Sun Apr 5 02:59:59 2020 AEDT isdst=1 gmtoff=39600
> Australia/Sydney Sat Apr 4 16:00:00 2020 UT = Sun Apr 5 02:00:00 2020 AEST isdst=0 gmtoff=36000
> Australia/Sydney Sat Oct 3 15:59:59 2020 UT = Sun Oct 4 01:59:59 2020 AEST isdst=0 gmtoff=36000
> Australia/Sydney Sat Oct 3 16:00:00 2020 UT = Sun Oct 4 03:00:00 2020 AEDT isdst=1 gmtoff=39600
I see this is Ubuntu 16.04. I found a 16.04 system and I was able to
recreate this exact problem there. However trying this on an 18.04
system and it is no longer an invalid date.
Bob
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 26 Nov 2020 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 204 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.