File Modification Date

Started by Joyce, April 13, 2016, 07:56:40 PM

Previous topic - Next topic

Joyce

Can someone with more experience than me, describe why the file modification date is changing by an hour when I view the metadata?  The create date/Date time Original and Modification date = 2012:01:08 09:38:25 when viewed with the computer date set to June 8th, 2012.  However, when the time on the computer date is set to today's date the File modification date changes to being off by one hour.  The Create Date/ Date/Time Original & File modification date are all the same 2012:01:08.  However the File Modification Date/Time changes to 2012:01:08 10:38:24 -6.00? 


Hayo Baan

As you thought yourself already, I am quite certain this is due to daylight savings time compensation or something like that (I remember seeing file modification times changing by an hour too on Windows). What day in 2012 was the computer set at? Most likely one without dst.
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

Windows is very peculiar in the way it handles daylight savings time.  There are a number of known bugs that are documented as Windows "features":

"When Windows NT automatically adjusts for daylight saving time, the times on files on Windows NT file system (NTFS) partitions and the events in the event logs are retroactively shifted by one hour, even though the files and event records were created before the daylight saving time change." (link)

So file date/times may change when daylight savings time changes even if they are in standard time.

It gets even more strange (note that ExifTool uses the GetFileTime function to retrieve file times in Windows):

"The FAT file system records times on disk in local time. GetFileTime retrieves cached UTC times from the FAT file system. When it becomes daylight saving time, the time retrieved by GetFileTime is off an hour, because the cache is not updated. When you restart the computer, the cached time that GetFileTime retrieves is correct. FindFirstFile retrieves the local time from the FAT file system and converts it to UTC by using the current settings for the time zone and daylight saving time. Therefore, if it is daylight saving time, FindFirstFile takes daylight saving time into account, even if the file time you are converting is in standard time." (link)

So the behaviour may change if the computer is restarted. :(

And the behaviour is different for different filesystems.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).