converting from Local Time to UTC time... 
Author Message
 converting from Local Time to UTC time...

Microsoft time functions will add the time bias for daylight savings time
based upon whether the current system time should be adjusted, not whether
or not the time you are trying to convert should be adjusted.  For example
if I used the following code to convert 4/27/99 10:00:00 PM to UTC using the
following code (system time is 2/1/99, Eastern Standard Time):

    SystemTimeToFileTime(&sysTime, &lFt);
     LocalFileTimeToFileTime(&lFt, &ft);
     FileTimeToSystemTime(&ft, &newST);

I would get 4/27/99 15:00:00 PM.

If I then changed my system clock to 4/27/99, I would get 4/27/99 14:00:00
PM.

These times should be identical.  The whole idea of UTC is that it is a
linear expression of time regardless of Time zone or Daylight Savings Time.
Are there any API's which will allow me to accurately convert from Local
Time to UTC and UTC to Local Time?

Thanks,

Al P.



Sat, 13 Oct 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

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

2. Converting UTC time to local time

3. converting UTC to local time

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

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

6. How to convert GMT time to local time?

7. local Time <-> UTC

8. local Time <-> UTC

9. UTC time from time server

10. convert time to UTC format

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

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

 

 
Powered by phpBB® Forum Software