GNU bug report logs -
#11798
touch date bug
Previous Next
Reported by: Patrick Castet <castet02 <at> yahoo.fr>
Date: Wed, 27 Jun 2012 16:17:01 UTC
Severity: normal
Tags: notabug
Done: Eric Blake <eblake <at> redhat.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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
This bug report was last modified 13 years and 27 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.