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

valid_zoneinfo_dir? never work in OpenBSD and FreeBSD (and Solaris) #15

Closed
nanaya opened this issue Feb 10, 2014 · 3 comments
Closed

valid_zoneinfo_dir? never work in OpenBSD and FreeBSD (and Solaris) #15

nanaya opened this issue Feb 10, 2014 · 3 comments
Assignees
Labels

Comments

@nanaya
Copy link

nanaya commented Feb 10, 2014

This method do its validation by testing existence of zone.tab and iso3166.tab files in same directory but both {Open,Free}BSD put iso3166.tab in different directory (/usr/share/misc). It's not even called iso3166.tab but iso3166 in FreeBSD.

In Solaris (10, 11, OpenIndiana), the files are in /usr/share/lib/zoneinfo/tab/country.tab (iso3166.tab) and /usr/share/lib/zoneinfo/tab/zone_sun.tab (zone.tab). The files look the same as original zone data though it might be just Solaris being Solaris.

@philr
Copy link
Member

philr commented Feb 15, 2014

Thank you for the report.

I'll take a look into this and try and change the zoneinfo detection to support BSD and Solaris for the next release.

@philr philr added the bug label Feb 15, 2014
@philr philr self-assigned this Feb 15, 2014
@braincomb
Copy link

I can confirm. I am on FreeBSD and have just stumbled upon this problem, I had to run ln -s /use/share/misc/iso3166 /usr/share/zoneinfo/iso3166.tab to fix this.

@philr
Copy link
Member

philr commented Apr 29, 2014

An analysis of zoneinfo data in FreeBSD, NetBSD, OpenBSD, Solaris and OpenIndiana:

FreeBSD

  • zoneinfo directory
    • /usr/share/zoneinfo
  • iso3166.tab
    • Outside of the zoneinfo directory: /usr/share/misc/iso3166
    • Uses a four column format instead of the usual two column format. The additional columns are the alpha-3 and numeric-3 codes.
  • zone.tab
    • Inside the zoneinfo directory.
    • Standard format.

NetBSD

  • zoneinfo directory
    • /usr/share/zoneinfo
  • iso3166.tab
    • Inside the zoneinfo directory.
    • Standard format.
  • zone.tab
    • Inside the zoneinfo directory.
    • Standard format.

OpenBSD

  • zoneinfo directory
    • /usr/share/zoneinfo
  • iso3166.tab
    • Outside of the zoneinfo directory: /usr/share/misc/iso3166.tab.
    • Uses the regular tz database format (two columns).
  • zone.tab
    • Inside the zoneinfo directory.
    • Standard format.

Solaris and OpenIndiana

  • zoneinfo directory:
    • /usr/share/lib/zoneinfo
    • Includes a src sub-directory containing the source time zone data files from the tzdata distribution.
    • Incldues a tab sub-directory containing modified versions of the tab files from the tzdata distribution.
  • iso3166.tab
    • Inside the zoneinfo directory.
    • Named tab/country.tab.
    • Uses the standard tz database format (two columns).
  • zone.tab
    • Inside the zoneinfo directory.
    • Named tab/zone_sun.tab.
    • Uses a non-standard five column format, adding an alternate time zone identifier column before the comment column (set to - if there is no alternate time zone).
    • Includes a regional time zone section using lower case country codes. The third column in this section is a continent identifier instead of a timezone identifier.

@philr philr closed this as completed in cd3377f Apr 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants