[tz] Preparing to fork tzdb

Howard Hinnant howard.hinnant at gmail.com
Tue Sep 21 14:45:03 UTC 2021

On Sep 21, 2021, at 10:29 AM, Jan Engelhardt <jengelh at inai.de> wrote:
> On Tuesday 2021-09-21 15:20, Howard Hinnant via tz wrote:
>>> On Mon 2021-09-20T23:34:25-0400 Howard Hinnant via tz hath writ:
>>>>       zoned_time zt{"America/Port-au-Prince", local_days{1957y/June/5} + 19h + 30min};
>>>>       cout << format("%F %T %Z", clock_cast<tai_clock>(zt.get_sys_time())) << '\n';
>> [...] IANA time zone names are part of the C++20 API, and pre-1970 data
>> is expected (best effort of course):
>>    zoned_time zt{"America/Port-au-Prince", local_days{1957y/June/5} + 19h + 30min};
>>    cout << format("%F %T %Z", zt.get_sys_time()) << '\n';
> I can't really find substance to this claim.
> The API [speaking of the locate_zone() function] wants a string, but it does
> not specify which particular string value(s) is/are needed to get any
> particular zone. locate_zone can succeed or it can fail.

This issue was discussed in committee, and is a most delicate one (to get the wording right).  In the end we believed that this sentence was the best way to describe the set of time zone names:


> [time.zone] describes an interface for accessing the IANA Time Zone Database that interoperates with sys_­time and local_­time. This interface provides time zone support to both the civil calendar types ([time.cal]) and to user-defined calendars.

We also added a link the Bibliography section, which is unfortunately not included in the online document:

> * IANA Time Zone Database. Available from: https://www.iana.org/time-zones

I was there, and I authored and championed this proposal through the standardization process.


Visual Studio is already shipping it.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <https://mm.icann.org/pipermail/tz/attachments/20210921/c49f721e/signature.asc>

More information about the tz mailing list