How to convert local time with specific time zone to UTC time in Win32 API 
Author Message
 How to convert local time with specific time zone to UTC time in Win32 API

Can anyone let me know whether there is a function in Win32 APIs
that I can convert local time with specific time zone information to
UTC time? I know there is a function, called
SystemTimeToTzSpecificLocalTime(), which can convert UTC time
to time zone specific local time, but what I really want to do is the
opposite.

Thanks,

Dongming Zhang



Fri, 21 Mar 2003 03:00:00 GMT  
 How to convert local time with specific time zone to UTC time in Win32 API
If you can do it one way, you can do it the other:
Convert 0:00 GMT to local time using your function.
That gives you the hour offset (maybe you need to
subtract 24 or so). From then on, you just subtract the
offset to any given time, and you're there.

In a nutshell: a + x - x = a.
Yours, Nikolaus


Quote:

> Can anyone let me know whether there is a function in Win32 APIs
> that I can convert local time with specific time zone information to
> UTC time? I know there is a function, called
> SystemTimeToTzSpecificLocalTime(), which can convert UTC time
> to time zone specific local time, but what I really want to do is the
> opposite.

> Thanks,

> Dongming Zhang



Sun, 23 Mar 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to convert local time to gmt using a local variable time zone per process/thread

2. Converting UTC time to local time

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

4. converting UTC to local time

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

6. How to convert GMT time to local time?

7. UTC time from time server

8. set date/time/time zone dialog

9. Real time From Time Zone information

10. local Time <-> UTC

11. local Time <-> UTC

12. convert time to UTC format

 

 
Powered by phpBB® Forum Software