Solaris multithreading and timezones

Valery Aronov valery at
Mon Oct 21 03:03:55 UTC 1996

We are moving our software towards multithreading (SunOS 5.5.1). One of
the many concerns is the MT-unsafety of tzset() function. It is said to be
MT-unsafe in man pages. It is partly due to the keeping references to
TZ in the environment variable, I guess. Our software needs to deal with
more than one timezone in one process. The only way I know to implement it
is to change the value of environment variable TZ and call tzset() every
time I want to switch to a new timezone.

External variables tzname and others also makes it problematic to maintain
access to them: other vendors' software we are using might use their own
policy of access.

How is it possible to manage current zone information in MT-safe fashion?

I would appreciate any help.


More information about the tz mailing list