[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
DST bug in touch utility
From: |
Cesar Mugnatto |
Subject: |
DST bug in touch utility |
Date: |
Thu, 3 Dec 2009 21:30:04 -0500 |
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.
Instead of being assigned the date
Oct. 3, 2009 12:01 AM
(what the user might expect)
it is assigned instead
Oct. 2, 2009 11:01 PM
(incorrect even if the we subtract a sufficient number of days in increments of
24 hours from the current date in Standard Time until we reach the touch date
in Daylight Saving Time, which would result in Oct. 3, 2009 1:01 AM )
Further, there is no switch to ignore Daylight Saving Time. In order to have a
date stamped at 1 minute past midnight as was the intent, we have to use:
touch.exe -c -t 200910030101 "filename.ext"
which means that as someone who is running the touch command has to be aware of
what date and time Daylight Saving Timecame to an end and whether the current
time differs from the intended touch time with respect to Daylight Saving Time,
and adjust accordingly.
Presumably, the same issue occurs in reverse when trying to touch a a file when
the current time is within Daylight Saving Time but the touch time is in
Standard Time.
_________________________________________________________________
Eligible CDN College & University students can upgrade to Windows 7 before Jan
3 for only $39.99. Upgrade now!
http://go.microsoft.com/?linkid=9691819
- DST bug in touch utility,
Cesar Mugnatto <=