[tz] Getting current tzdb version in use

Aldrin Martoq Ahumada aldrin.martoq at gmail.com
Thu Jul 19 01:36:10 UTC 2018


Hi,

I was looking for a reliable way to get the current tzdb version (something like 2018e), but it seems it doesn’t exists yet. A couple of examples:
- In Mac OS 10.13.6, there is a /usr/share/zoneinfo/+VERSION that says 2018c.
- In one of my updated Ubuntu 16.04 servers, the only reliable way is to do a dpkg -s tzdata | grep ^Version, and guess the real version from the string “Version: 2017c-0ubuntu0.16.04"
- The “tzinfo” ruby library can get the version only if it uses its own version of tzdata, if it uses the OS files, there is no string version.

Knowing the current tzdb version is essential for automating timezone updates.


I think an appropriate place to put that string is in the binary TZif file itself, so tools like tzinfo can get the current version *of the current timezone in use*, instead of looking some random file like +VERSION in a random directory/folder.

Is there any chances for this to happen? Or any other suggestion?


Aldrin.





More information about the tz mailing list