[tz] question regarding 'timezone' variable

Paul Eggert eggert at cs.ucla.edu
Wed Sep 2 06:02:56 UTC 2015

Christos Zoulas wrote:
>          pt = _add(tzname[t->tm_isdst != 0],
> ...
> How do you access tzname which is a global making sure that it does not
> change under you by another thread?

You don't.  The code involving tzname isn't used on a system that has a working 
tm_zone member.  Any system desiring thread-safety should have a struct tm with 
both tm_zone and tm_gmtoff members, as NetBSD does.

More information about the tz mailing list