Skip to content

Add "factory" data file to Tz #161

Description

@kipcole9

Current Behaviour

In testing ex_cldr_dates_times updated time zone formatting I see that the valid timezone "Factory" is not recognised as such by Tz since the factory file is not compiled by Tz:

for filename <-
    ~w(africa antarctica asia australasia backward etcetera europe northamerica southamerica)s do

I appreciate this is a very niche case, but it is a valid timezone. In fact there is some annotations to that affect in the file.

TLDR; TZ="Factory" is a valid timezone

TZ="Factory" was added to TZDB in 1989, and in 2016 its abbreviation
was changed to "-00" from a longish English-language error message.
Around 2010, CLDR added "Etc/Unknown" for use with TZDB, to stand
for an unknown or invalid time zone. These two notions differ:
TZ="Factory" is a valid timezone, so tzalloc("Factory") succeeds, whereas
TZ="Etc/Unknown" is invalid and tzalloc("Etc/Unknown") fails.
Also, a downstream distributor could modify Factory to be a
default timezone suitable for the devices it manufactures,
whereas that cannot happen for Etc/Unknown.

Expected behaviour

"factory" is a valid time zone.

Possible resolution

Change:

 ~w(africa antarctica asia australasia backward etcetera europe northamerica southamerica)s

To

 ~w(africa antarctica asia australasia backward etcetera europe northamerica southamerica factory)s

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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