How can I keep the dir command date/time from changing?

1

I created a directory listing (text file) with a dir command 3 months ago. The files haven't changed since then. Now, a listing of the same files shows every file with a timestamp exactly one hour earlier. Now I have no way to find actual differences in the directory listings by comparing the listings because every line is different. How do I fix this serious problem so that listings made on one date can be compared with those made on another? (I have "adjust for daylight saving time automatically" turned on.)

Example lines in old listing:

03/11/2014  09:08 PM            18,432 VIDEO_TS.BUP
03/11/2014  09:08 PM            18,432 VIDEO_TS.IFO
03/11/2014  09:08 PM            36,864 VIDEO_TS.VOB
03/11/2014  09:08 PM            92,160 VTS_01_0.BUP
03/11/2014  09:08 PM            92,160 VTS_01_0.IFO

Same lines in new listing:

03/11/2014  08:08 PM            18,432 VIDEO_TS.BUP
03/11/2014  08:08 PM            18,432 VIDEO_TS.IFO
03/11/2014  08:08 PM            36,864 VIDEO_TS.VOB
03/11/2014  08:08 PM            92,160 VTS_01_0.BUP
03/11/2014  08:08 PM            92,160 VTS_01_0.IFO

Freon Sandoz

Posted 2017-01-26T08:03:56.123

Reputation: 99

If the times changed then the files most likely changed, even if is meta information. Depending on what information you're looking for you could drop the date, time, or both and compare them without that information. – Seth – 2017-01-26T08:10:07.343

Answers

0

The reason this is happening is due to daylight savings.

When daylight savings is in effect, the actual time does change on the system, and as such it is reflected in the dirlisting as well.

When daylight savings are in effect, we change to a different timezone. In windows it means the time is altered by an hour as well, and as such a dirlisting now shows time time with 1 hour difference.

In 6 months, when daylight savings change again, the time will revert back to 9 PM.

There's nothing you can do about it, nor would you want to. This is by design.

LPChip

Posted 2017-01-26T08:03:56.123

Reputation: 42 190