GNU bug report logs - #43828
invalid date converting from UTC, near DST

Previous Next

Package: coreutils;

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.

Full log


View this message in rfc822 format

From: Bob Proulx <bob <at> proulx.com>
To: Martin Fido <mart <at> fidolab.org>
Cc: 43828 <at> debbugs.gnu.org
Subject: bug#43828: invalid date converting from UTC, near DST
Date: Thu, 15 Oct 2020 22:30:17 -0600
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




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.