Hello all,
A problem came across to me with our DOS application concerning daylight savings time.
The program is compiled in Microsoft C 6.0. The problem seems to happen when running on Windows 2000. We tried the executable on Windows 98SE and it seems to work fine.
Here's the problem. Yesterday (04/04/2004) at 2:00am we were supposed to jump forward to 3:00am. (We are in Central time zone). Windows correctly jumped ahead. However, our application which was running in a DOS window at the time went from 1:59 to 1:00.
The code in question is:
time(clock);
tm=localtime(clock);
asctime(tm);
The time function itself seems to be returning the wrong time. Based on info on Microsoft's web site I went playing with the TZ environment variable. But no avail. It almost seems like it's setting it to Pacific time. (which is the default time zone for TZ)
ugh! I just love when a program function is -no longer supported-
Any help would be appreciated,
Bob
A problem came across to me with our DOS application concerning daylight savings time.
The program is compiled in Microsoft C 6.0. The problem seems to happen when running on Windows 2000. We tried the executable on Windows 98SE and it seems to work fine.
Here's the problem. Yesterday (04/04/2004) at 2:00am we were supposed to jump forward to 3:00am. (We are in Central time zone). Windows correctly jumped ahead. However, our application which was running in a DOS window at the time went from 1:59 to 1:00.
The code in question is:
time(clock);
tm=localtime(clock);
asctime(tm);
The time function itself seems to be returning the wrong time. Based on info on Microsoft's web site I went playing with the TZ environment variable. But no avail. It almost seems like it's setting it to Pacific time. (which is the default time zone for TZ)
ugh! I just love when a program function is -no longer supported-
Any help would be appreciated,
Bob