
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