[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DST bug in touch utility
From: |
Eric Blake |
Subject: |
Re: DST bug in touch utility |
Date: |
Thu, 03 Dec 2009 22:21:47 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Bob Proulx on 12/3/2009 10:15 PM:
> Cesar Mugnatto wrote:
>> When using:
>> touch.exe -c -t 200910030001 "filename.ext"
>> (or for that matter, any date that falls within Daylight Saving
>> Time) and the date on which the touch command was issued is in
>> Standard Time (for example today's date Dec. 3, 2009), the file
>> "filename.ext" is touched with an incorrect date.
>
> Thank you for your bug report. I can see by your filename touch.exe
> that you are not using a native version of GNU touch but one of the
> ports from GNU to MS. What port are you using? What is the version
> of it? What timezone are you using?
More importantly, what filesystem are you using? Microsoft's
implementation of FAT is notoriously limited in that it stores a local
timestamps based on the timezone that was in effect when the timestamp was
written, and reads timestamps back according to the timezone in effect
during the read. As a result, you are VERY prone to seeing these
mysterious one hour jumps in timestamps on files stored on FAT. You get
much more consistent results when using a better filesystem, like NTFS,
where timestamps are stored relative to UTC rather than as a local timestamp.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAksYnGsACgkQ84KuGfSFAYAc5gCfRHhkhLYqShw/cgifen1vfg/k
wtEAoLB2rCEY4j/BbZB2vAj7IL1dl0RG
=P8Fc
-----END PGP SIGNATURE-----