[xplorer˛] — Synchronization part II: Adjusting DST
home » blog » 28 October 2007
play flash demo


"My girlfriend went to a parallel universe that lacks bilateral symmetry and all I got was this F-shirt"

Just as we were discussing folder synchronization, my windows today changed the clock back one hour, how convenient for the second part of this series! Summer time is gone (metaphorically too) and we switched into daylight savings (DST) mode. Did you know that this messing about with +/-1 hour is a relatively recent invention? Neither did I until I visited the beginning of all things time, the Greenwich observatory museum a couple of years ago.

An extra hour of daylight can help the working classes get up on dark dull winter mornings but plays havoc with file times. On newer NTFS formatted partitions filetime is stored as UTC, which is 100 nanosecond intervals passed since January 1601. On older FAT partitions file time is stored adjusted for local time (time zone + DST). If you try to compare times between FAT and NTFS when DST mode kicks in, there appears to be one hour difference. Files that were identical last night now appear changed by 1 hour. Today we'll all spend our time changing clocks back an hour and fathoming ghost file time changes. And all this is repeated in reverse every March when summer time is reinstated. Aristotle never had a watch and thus none of the associated headaches. (Probably he didn't have to go to work either, he was philosophising from his armchair all the time, winter or summer :)

Why doesn't xplorer˛ automatically adjust for such ghost time changes? I did try at first but the more I was digging in all the little details, exceptions and clauses the more impossible the task became. The official documentation didn't help much either, here's a sample of the "help" offered in MSDN:

FAT records times on disk in local time. GetFileTime retrieves cached UTC times from FAT. When it becomes daylight saving time, the time retrieved by GetFileTime will be off an hour, because the cache has not been updated. When you restart the machine, the cached time retrieved by GetFileTime will be correct. FindFirstFile retrieves the local time from FAT and converts it to UTC using the current settings for the time zone and daylight saving time. Therefore, if it is daylight saving time, FindFirstFile will take daylight saving time into account, even if the file time you are converting is in standard time...

Try to understand that and other differences having to do with OS, zipfolders and FTP and you quickly lose heart. Instead of guessing file time intricacies xplorer˛ turns the problem on its head and offers a remedy: change the file times on FAT drives so they match those on NTFS folders. If you know that files are identical you can wipe out the 1 hour difference using Actions | Sync touch menu command. It matches files by name and "copies" (touches) the modified time of the item in the active folder onto the corresponding one in the inactive pane. The file contents are not touched, only the last modification date. In the end order is restored using the alexander technique. See the accompanying demo for a step by step guide

Post a comment on this topic

AddThis Social Bookmark Button

 

 

What would you like to do next?

Reclaim control of your files!
  • browse
  • preview
  • manage
  • locate
  • organize
Download xplorer2 free trial
"This powerhouse file manager beats the pants off Microsoft's built-in utility..."

download.com
© 2002—2007 Nikos Bozinis, all rights reserved