
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?
Help!
Christian Parker