Skip to content

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

@homer242

Description

@homer242

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions