[geeks] [Winsucks-related] XP file timestamps vs. Linux file timestamps

Jonathan C. Patschke jp at celestrion.net
Wed Dec 1 07:38:25 CST 2004


On Tue, 30 Nov 2004, Patrick Giagnocavo wrote:

> When Daylight Savings Time kicks in, the file timestamps on Windows,
> OR on Linux, appear to change, which makes the sync application think
> that "all the files have changed and are now 1 hour older than the
> current copy of the file on the laptop" .

Yep.

> Of course, this behavior will happen, again, in reverse, in another 6
> months...

Yep.

> Has anyone else bumped into this before?  If I use the cygwin rsync,
> can I expect the behavior to be more sane?

Nope.

Unix stores time as an offset from 01-JAN-1970 00:00:00 UTC, which is
never adjusted destructively for DST.  On Unix, DST is just an aspect of
how to present the time to the end-user, the actual clock isn't rocked
forward/back an hour; it marches forward a consistent one beat per
second across both DST boundaries.

On Windows, the system -hardware clock- gets adjusted twice annually, so
unless the application is acutely aware of DST and its implications,
it'll see an actual timeshift, regardless of whether it asks for the
time via the Windows stardard APIs or the cygwin emulated time()
function.

Consider running NTP as a way to ensure that the clock change happens
consistently between the two systems.  Windows can't talk NTP directly
(at least, not without third-party tools), but it can talk to a "Windows
Time Service", which Samba may or may-not be able to be these days.

-- 
Jonathan Patschke ) "I've built my whole system with [-fomit-frame-pointer]
Elgin, TX        (  cause it was recommended...as I don't care if a program
USA               ) crashes, not interested in finding out why."
                  (                    --Tim, Another Satisfied Gentoo User



More information about the geeks mailing list