timezones and universal coordinated time 
Author Message
 timezones and universal coordinated time

I am developing an application for windows NT with Visual C++ 4.2.  My
application frequently gets the current time from the NT system.  In
the code I do this with the time(NULL) call.  I recently noticed some
strange behavior when running the app under different time zones.
According to the documentation, this call is returns the current time
in seconds since midnight Jan1, 1970 converted to universal
coordinated time.  But when I change my time zone to Indiana-East (a
special time zone setting to account for Indiana not changing to
daylight savings time) and run my application, the time() call returns
a number that is 3 hours different from the number I get when I run my
application in the Eastern Standard time zone.  

Furthermore, the time() call returns the same number when running
under Pacific, Eastern, Central, and any other time zone I have tried.
It seems the Indiana-East time zone is off by three hours.

When I run the same code under unix (Dec OSF Unix 4.0) I get the same
number for any time zone.

Shouldn't Universal Coordinated Time be independant of time zone?

Christian Parker

Wed, 13 Sep 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Date and Time in Different Timezones

2. Universal Disassemblers vs. Universal MIILs

3. Universal Time Code

4. Universal time format..

5. Visual Studio.NET time bomb / MSDN Universal subscription download

6. screen coordinates -> window coordinates

7. converting logical coordinates to screen coordinates

8. Date Time and Timezones what is the best way to find relative time?

9. Automatic DateTime formating between TimeZones?

10. time_t, tm*, and timezones (please read!)

11. Q: conversion between timezones

12. time_t, tm*, and timezones (please read!)


Powered by phpBB® Forum Software