This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Timezone shenanigans


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]