in reply to Standard way to convert timezone in multithreaded script

This is a case of POSIX standard hysteresis.

Your CRTs idea of the current TZ setting is determine at startup and then buffered. Changing the value of TZ in your process' (or thread's) copy of the environment won't change the CRT's buffered notion of the timezone directly. After the change you need to request that the CRT re-evaluate it. The POSIX tzset() call is defined to do that. It may work for you on *nix.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP PCW It is as I've been saying!(Audio until 20090817)
  • Comment on Re: Standard way to convert timezone in multithreaded script