[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Daylight savings time fix for WinNT
From: |
Derek R. Price |
Subject: |
Re: Daylight savings time fix for WinNT |
Date: |
Tue, 21 Nov 2000 14:36:32 -0500 |
Tony Hoyle wrote:
> "_tzset helps but isn't the complete solution. When the clocks changed
> again
> all the files became modified again. I think there is something wrong
> with
> the implementation of the time functions in the C libraries, but it's
> difficult
> to test (In summer I'm one hour off GMT and in winter the same as GMT.
> Especially
> in winter debugging such code is a nightmare...)
I've managed to isolate the problem. Turns out it's not in the time
libraries at all. stat on NT returns different [acm]times depending on
whether Daylight Savings Time (DST) is in effect or not (+3600 seconds
during DST). Since I can change my time zone without changing the UTC mtime
returned by stat I can only assume that whoever wrote the Windoze stat
function must have tried to account for DST when they didn't need to.
I'm going to search MSDN for a few for a recommended solution, but if I
can't find one I'll check in a stat wrapper that will subtract the errant
3600 seconds from mtime, ctime, and atime under Windoze.
Derek
--
Derek Price CVS Solutions Architect ( http://CVSHome.org )
mailto:dprice@openavenue.com OpenAvenue ( http://OpenAvenue.com )
--
He always has.
- Humphrey Bogart as Rick, _Casablanca_