From: Adrian Aichner [mailto:aichnerï¼ ecf.teradyne.com]
>>>>> "Bill" == Bill Tutt
<billtut(a)microsoft.com> writes:
Hello Bill!
Bill> Adrian, your stat wrapping makes sense to me.
What I have yet to put in, is to determine whether the current volume
actually has UTC dates. Fabrice suggested using
GetVolumeInformation() and that works fine too.
Does CDFS have UTC times?
With your current fix, what would this gain?
As long as you compare file times using identical methods all the time, then
it should never matter.
To fill in the details on the ISO CD FS spec: (not the Win32 CDFS driver)
Volume creation date/times are formatted something like:
struct sCDFS
{
DWORD dwYear;
WORD wMonth;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wHundredths;
BYTE bOffsetFromGMT; // This is for 15min. intervals
};
Bill> The explination behind this mess is fairly straight
forward:
Bill> NT doesn't use the standard timezone handling library that
Bill> everyone knows and loves in Unix land. See KB article:
Bill> Q115231 for details on what Win32 actually does.
Bill> Which is why FileTimeToLocalTime() can only use the current
Bill> DST state, and stat() uses FileTimeToLocalTime() due to
Bill> various backwards compatibility reasons. See the MS CRT
Bill> source for the grungy details.
Bill> glibc appears to do the correct thing by searching through
Bill> the timezone's transition history and makes the appropriate
Bill> adjustment. (including leap seconds)
Isn't that neat?
Yeah it is. It'd be even neater if time_t could handle all of the timezone
transitions that the timezone file has.
Bill