This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
Timezone shenanigans
- To: glibc-linux@ricardo.ecn.wfu.edu
- Subject: Timezone shenanigans
- From: Jon Manning <jmanning@ebs.ltd.uk>
- Date: Tue, 25 May 1999 13:42:06 +0000
- Organization: EBS Ltd
- Reply-To: glibc-linux@ricardo.ecn.wfu.edu
Hi,
I'm writing a multi-threaded application where one of the threads
has to be in a different timezone to the rest of them. This rules out
setting the TZ environment variable unless that whole section is
encased in mutexes, which isn't very friendly. It therefore looks as
though the only other option is to copy out the tzset() from the
glibc and provide my own function that does a modified localtime()
function of the form localtime(time_t*,char* TZ), which also has
it's disadvantages.
My question therefore is:
Is there a better way of finding the time in a different timezone
that
is safe between threads? Otherwise, would there be a call for this
added functionality?
Jon.