On 2020-11-14 00:20, Guy Harris wrote:
On Nov 13, 2020, at 5:17 AM, Michael H Deckers <michael.h.deckers@googlemail.com> wrote:
The computing interfaces for tzdb data typically allow for the conversion between datetimes of UTC and datetimes of any tzdb Zone time. The computing interfaces, with the "posix" values, allow for the conversion of a value expressed as POSIX "seconds since the Epoch" - i.e., as a count of seconds, *excluding* leap seconds, that have elapsed since the Epoch - to a date and time, expressed as year/month/day/hour/minute/second, either as UTC (gmtime()) or as local time in any tzdb region (localtime()). If you want to convert between......
Thanks for all the details! Actually, localtime_rz() and mktime_z() should suffice, and for the "right" tzdb data, posix2time() and time2posix(). Actually, I meant the modern interfaces as in Java etc where the change of representation (choice of calendar, MJD, POSIX count of seconds since 1970, etc) is separated from the conversion among time scales (UTC, tzdb Zone time scale values, and perhaps other time scales), and where the conversions supply enough additional information if the conversion is not bijective. The C library interface is not sufficient (at least not without quite a bit of additional work) to convert the UTC value 2016-12-31T23:59:60.5 into the value 2016-12-31T15:59:60.5-08:00 of Pacific time. Michael Deckers.