[tz] Getting current tzdb version in use
howard.hinnant at gmail.com
Fri Jul 20 00:22:11 UTC 2018
On Jul 19, 2018, at 7:29 PM, Paul Eggert <eggert at cs.ucla.edu> wrote:
> Howard Hinnant wrote:
>> vendors can easily add version files to their compiled binary databases (as Apple already does for macOS, iOS and watchOS).
> How does that work, exactly? I don't have easy access to any of those systems. Is it documented anywhere?
Deborah Goldsmith should chime in if I get anything wrong…
I’m not aware of any documentation (I haven’t looked). And I’m ignorant of the Apple deployment process.
On the most recent update to macOS, the file:
And that’s good enough for a std::lib vendor on macOS to read and fill out std::chrono::get_tzdb().version.
There also exists a generic (version-free) symlink path to the same file:
(which is what my prototype uses when compiled in the mode of using the zic-compiled binary database).
At this time, Apple does not do the following: But it is possible that in the future, Apple could choose to update the zoneinfo database to a new directory, and atomically update the /usr/share/zoneinfo/ symlink, _without_ requiring a system reboot. This would enable long-running programs to query the OS, detect the version change of the tzdb, and update their internal ram copies of the tzdb, without the program having to go through a shutdown/restart sequence. The C++20 API is anticipating (but not requiring) that capability.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: Message signed with OpenPGP
More information about the tz