[tz] NetBSD vs Darwin timezone API

Guy Harris guy at alum.mit.edu
Sat Nov 12 06:22:33 UTC 2016


On Nov 11, 2016, at 3:22 PM, Paul Eggert <eggert at cs.ucla.edu> wrote:

> Guy Harris wrote:
>> neither tzgetname() nor tzgetgmtoff() fully support the tzdb ... if we were to provide similar APIs, they'd have to take something such as a time_t as an argument
> 
> I don't see the need, as one can call localtime and get the time zone abbreviation from tm_zone. This works on NetBSD, which defines tm_zone, so those two functions are unnecessary there. Any platform lacking tm_zone should add it instead of adding those two functions.

So, if we were to provide tzalloc() and tzfree(), we wouldn't provide tzgetname() or tzgetgmtoff()?

So, in past discussions, what conclusion did we come to, if any, about the lifetime of memory pointed to by tm_zone?


More information about the tz mailing list