On Tue, Aug 03, 2004 at 03:04:39PM -0400, Michael Lindner <mlindner@idttechnology.com> wrote:
I have a multithreaded server that has a thread per client, and needs to talk to clients in their local timezone. All the "normal" UNIX time functions rely on "TZ" for timezone information, so even though they're nominally "thread-safe" they don't support my application, since TZ is global across threads.
Is there a localtime()-like implementation out there that can do what I
I am sure others will additionally have useful advise, but why don't you just put a lock around your calls to localtime? localtime is rarely a bottleneck (it might be for your application), so this shouldn't be a problem. -- The choice of a | -----==- _GNU_ | ----==-- _ generation Marc Lehmann +-- ---==---(_)__ __ ____ __ pcg@goof.com |e| --==---/ / _ \/ // /\ \/ / http://schmorp.de/ --+ -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE | |