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

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

Projects

None yet

3 participants

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.

Owner
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

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.

Owner
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 added a commit that closed this issue Apr 30, 2014
@philr philr Support loading system zoneinfo data on FreeBSD, OpenBSD and Solaris.
- Support locating the iso3166.tab file when it is not included in the
  zoneinfo directory.
- Handle the four column iso3166 tab file format used by FreeBSD.
- Support finding the iso3166.tab and zone.tab files using alternative
  names on Solaris (tab/country.tab and tab/zone_sun.tab).
- Support loading country zone data from the non-standard five column
  zone_sun.tab format.

Resolves #15.
cd3377f
@philr philr closed this in cd3377f Apr 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment