bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63349: Bug in date when using UTC/GMT timeszones in the TZ variable


From: Eiríkur Hjartarson
Subject: bug#63349: Bug in date when using UTC/GMT timeszones in the TZ variable
Date: Sun, 7 May 2023 13:28:28 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

Hi,

I'm on Fedora-38 GNU/Linux and the version string of 'date' is "date (GNU coreutils) 9.1".

$ ls -l /etc/localtime
lrwxrwxrwx. 1 root root 40 jan 11 2022 /etc/localtime -> ../usr/share/zoneinfo/Atlantic/Reykjavik

Now the "bug":

$ TZ=Europe/Riga date --iso-8601=minutes -d "2024-01-01T00:00-05:00"
2024-01-01T07:00+02:00

$ TZ=UTC+2 date --iso-8601=minutes -d "2024-01-01T00:00-05:00"
2023-01-01T03:00-02:00

That is: the first command gives me the time and date in Riga when it's
midnight at new year's eve in New York.

The second command should do the same but instead gives the time in Godthab Greenland.

$ TZ=America/Godthab date -d "2024-01-01T00:00-05:00" --iso-8601=minutes
2024-01-01T03:00-02:00

It seems to me that the sign in the timezone variable could be simply reversed.

Regards,
--
Eiríkur





reply via email to

[Prev in Thread] Current Thread [Next in Thread]