Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

TOUCH and DST

Dec
3
0
I want to touch modify date and time of some files, putting current date and 0:00 as time, so I use this command:

touch /d%_date /t0:00 *.*

The problem occurs when there is a DST (daylight saving time) change. When it occurs, the files that I modified before the change shows after the change a wrong time, or 23:00 of the previous day, or 1:00 of the current day, depending of the type of the DST change.

Is there any way to avoid this? Thanks.
 
> I want to touch modify date and time of some files, putting current date and 0:00 as time, so I use this command:
>
> touch /d%_date /t0:00 *.*
>
> The problem occurs when there is a DST (daylight saving time) change. When it occurs, the files that I modified before the change shows after the change a wrong time, or 23:00 of the previous day, or 1:00 of the current day, depending of the type of the DST change.
>
> Is there any way to avoid this? Thanks.
>

This is a "feature" of NTFS and has been a problem for years. NTFS always
converts file times to UTC before storing them. They are converted back when you
retrieve them but they will be converted based on the current, local, DST setting.

Article "http://support.microsoft.com/kb/129574" tries to explain/justify this
behavior.

The only real solution is to keep your system time as UTC. Not very appealing to
most of us.
 
dbartt wrote:
| This is a "feature" of NTFS and has been a problem for years. NTFS
| always converts file times to UTC before storing them. They are
| converted back when you retrieve them but they will be converted
| based on the current, local, DST setting.
|
| Article "http://support.microsoft.com/kb/129574" tries to
| explain/justify this behavior.
|
| The only real solution is to keep your system time as UTC. Not very
| appealing to most of us.

Actually, it's not NTFS itself, but the OS, which misconverts from UTC to
local time during information retrieval, if the DST status of the event is
different from the current DST status. IIRC some plugins do correct this.
--
Steve
 
As others have stated, the problem is with the OS. If you want to see
dir-like listing that shows the right times, you might get good
results from my timedir program found at jcook.net/timedir

It is largely compatible with dir from TCC but I went out of my way to
use a time conversion that is incompatible with Windows so that the
times would not shift as you've seen. Note that timedir will (by
default) display different times than explorer, cmd, and TCC which
agree with each other but not the wall clock.

On Fri, Nov 6, 2009 at 5:47 AM, estibbons <> wrote:

> I want to touch modify date and time of some files, putting current date and 0:00 as time, so I use this command:
>
> touch /d%_date /t0:00 *.*
>
> The problem occurs when there is a DST (daylight saving time) change. When it occurs, the files that I modified before the change shows after the change a wrong time, or 23:00 of the previous day, or 1:00 of the current day, depending of the type of the DST change.
>
> Is there any way to avoid this? Thanks.
>
>
>
>
>



--
Jim Cook
2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Sunday.
 
Back
Top
[FOX] Ultimate Translator
Translate