bug#43828: invalid date converting from UTC, near DST

2020-10-28 Thread Bob Proulx
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#43828: invalid date converting from UTC, near DST

2020-10-16 Thread Martin Fido
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





bug#43828: invalid date converting from UTC, near DST

2020-10-15 Thread Bob Proulx
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





bug#43828: invalid date converting from UTC, near DST

2020-10-06 Thread Paul Eggert

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





bug#43828: invalid date converting from UTC, near DST

2020-10-06 Thread Martin Fido
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 
.
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.