Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent POSIX TZ string returned by tzdump depending of time machine #8

Open
homer242 opened this issue Nov 9, 2022 · 1 comment

Comments

@homer242
Copy link

homer242 commented Nov 9, 2022

Hello,

I found a problem with tzdump program. The TZ string returned by tzdump can be different depending if the machine time is in DST or not.

For instance, with America/Iqaluit timezone and tzdata-2021a, tzdump gives me for today, nov 9:

$ date
Wed 09 Nov 2022 10:49:45 AM CET
$ tzdump -q -p . America/Iqaluit
# America/Iqaluit
EST5EDT,M3.2.0,M11.1.0

But if I change my machine time to be 1 september (the point here is to switch to daylight saving time on the machine), tzdump gives me an another TZ POSIX string:

$ sudo date -s "1 SEP 2022 11:00:00"
$ date
Thu 01 Sep 2022 11:02:23 AM CEST
$ tzdump -q -p . America/Iqaluit
# America/Iqaluit
EST5EDT,M3.2.0/3,M11.1.0

Several timezones give different TZ strings depending of the machine time (Iqaluit, Troll, Gaza, Hebron, ...), not all timezones contained in the tz database.

@kurahaupo
Copy link

To be clear, the difference between those strings is the insertion of /3, which changes the time-of-day when DST starts, from 2am to 3am.

@homer242, could you please clarify which is the correct one for the Iqualuit timezone?

kurahaupo added a commit to kurahaupo/tzdump that referenced this issue Jun 30, 2024
Fix logic error
@kurahaupo kurahaupo mentioned this issue Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants