From: francois reygagne <freygagne@opteway.com>
Subject: Convert local time to gmt time without using TimeZone Env variable
Date: Fri, 06 Apr 2001 11:40:09 +0200 [thread overview]
Message-ID: <3ACD8EF9.221E5F8F@opteway.com> (raw)
The ftcs unix mktime use the function tzset to initialize time
conversion information by setting an environment variable. That is not
thread-safe.
As I want to work in multi_threaded design with different time-zone, one
per each thread, I can't use the unix standard fonctions like mktime. I
need a thread-safe function that converts a local-time attached to its
timezone into a GMT time as follow:
void localtime_to_gmt(const char * timezone, const struct tm
localtime, time_t * gmt_time);
Is there a sofftware which uses instead of TZ env variable a local time
zone variable attached to the process to convert a local time to GMT ?
Thanks for your help ?
Fran�ois REYGAGNE. Software Architect.
opt[e]way S.A., 2881 route des Cr�tes, BP308
06906 Sophia Antipolis Cedex, FRANCE
t�l: +33 (0)4 92 95 27 01 http://www.opteway.com
next reply other threads:[~2001-04-06 9:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-06 9:40 francois reygagne [this message]
2001-04-08 23:41 ` Convert local time to gmt time without using TimeZone Env variable Mark Garrett
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox