[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#11798: touch date bug
From: |
Bob Proulx |
Subject: |
bug#11798: touch date bug |
Date: |
Wed, 27 Jun 2012 23:33:40 -0600 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Eric Blake wrote:
> Patrick Castet wrote:
> > $ touch a0.a
> > $ touch -d "20000102 03:04:05" a0.a
> > if you check with widows cmd, you get
> > a0.a is dated with 20000102 04:04
> >
> > wich is not correct !
>
> Welcome to the joys of Microsoft's decision to store file timestamps
> with respect to local timezones rather than with respect to UTC, even
> though that means that physically relocating your machine to a spot with
> different daylight savings rules renders those timestamps ambiguous.
> The difference of one hour that you are seeing is due to Windows'
> insistence on applying a (possibly wrong) daylight savings adjustment,
> based on the timestamp on the file vs. what Windows considers as your
> current time zone.
Additionally it appears you are operating on a FAT filesystem. MS FAT
filesystems represents times with only a 2-second resolution. This
causes all timestamps to be even second values. Odd second values are
modified to fit. This is the :05 time being set to :04 that is
illustrated above.
This problem for example caused 'rsync' to include a --modify-window
option so that it can be used like --modify-window=1 to allow times to
differ by up to 1 second to work around this issue.
Bob