views:

45

answers:

2

I just noticed something strange on my WinXP SP3 PC: When I change the sytemdate from 2 November (W.Europe Standard Time) to 2 August (W.Europe Daylight Time), Windows Explorer shows a different time in the DateModified field of all the folders and files.

For example: I saved a file today and the value of DateModified is '02-11-2009 18:47'. But when I change the systemdate to 2 August, the value of DateModified is '02-11-2009 19:47'.

That's not what I expected ! Is there a specific reason why Windows does this ?

A: 

the file modification date is stored as GMT, but it is displayed using the current time settings. if you live in an area with daylight saving time (and i bet you are), the time switches from GMT+X+1 to GMT+X at the end of october (X depends of your time zone, it is 1 in western europe).

thus, the computer uses a different conversion when displaying a date in august and in november: this accounts for the 1 hour difference you see depending on the current date of your computer.

Windows SDK API have a set of function for converting between GMT times and time zone specific times. also, i seem to remember that the API to get file modification date always returns a GMT time. unfortunately, i don't think such tools exists for a batch file... try setting the time zone of the computer to GMT ?

Adrien Plisson
Thanks for your answer, Adrien.You wrote:"the file modification date is stored as GMT, but it is displayed using the current time settings."So, if I want to know the *real* time a file is modified (or created), I have to compare the date of the file to the current date, and then do some calculations ?Wouldn't it be more logical (and certainly more convenient) if Windows Explorer would do this for me ?
A: 

I just installed update KB976098 (also KB973688 and KB973687).

The details of 'Update for Windows XP (KB976098)': "Install this update to resolve issues caused by revised daylight saving time and time zone laws in several countries. This update enables your computer to automatically adjust the computer clock on the correct date in 2009. After you install this item, you may have to restart your computer."

I hoped that this update would solve the problem mentioned in my original question. Unfortunately it doesn't.