How to convert local time to gmt using a local variable time zone per process/thread 
Author Message
 How to convert local time to gmt using a local variable time zone per process/thread

The ftcs unix mktime use the function tzset to initialize time
conversion information by setting a single and only one environment
variable. timezone available for all the OS.

As I want to work in multi_threaded design with different time-zone, one

per each thread or per process, 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 Crtes, BP308
06906 Sophia Antipolis Cedex, FRANCE
http://www.*-*-*.com/
--



Tue, 23 Sep 2003 06:14:56 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Convert local time to gmt time without using TimeZone Env variable

2. How to convert local time with specific time zone to UTC time in Win32 API

3. How to convert GMT time to local time?

4. GMT time and Local time ?

5. Q: How to convert GMT to local time?

6. Converting GMT to local time

7. Converting UTC time to local time

8. converting from Local Time to UTC time...

9. GMT to local time conv

10. Time: UCT, local time, daylight - any standards?

11. Time: UCT, local time, daylight - any standards?

12. Time: UCT, local time, daylight - any standards?

 

 
Powered by phpBB® Forum Software