You are not logged in.

#1 28 Jul 2020 01:38

Shane
Member
From: Victoria, BC
Registered: 17 May 2018
Posts: 12

Command line versus File Explorer Time

Hello,

I used the copy command without knowing the created time isn't preserved, and so I'm trying to fix a few dates. I noticed that the command line shows a different date and time than File Explorer: the time is one hour earlier in File Explorer. Also, running the command:

tzutil /g

Outputs "Pacific Standard Time", which is incorrect. It is currently Pacific Daylight Time.

Does the dir /tc command not adjust for Daylight Savings Time?

I'm asking because I would like to manually adjust a date (using NirCmd), but if the command line doesn't adjust for daylight time, do I need to enter a different time in order for it to be correct?

Thanks,
Shane.


Windows 10 Home 64-bit

Offline

#2 29 Aug 2020 18:44

mikeyww
Member
Registered: 29 Aug 2020
Posts: 5

Re: Command line versus File Explorer Time

Try it and see.

Offline

#3 01 Sep 2020 01:51

Shadow Thief
Member
Registered: 12 Jul 2012
Posts: 205

Re: Command line versus File Explorer Time

tzutil does adjust for daylight savings time, but it doesn't change the name, because the command returns the name of the time zone that you're in and not the time offset. If you set the timezone with the /s flag and give it the _dstoff suffix, it will stop adjusting for DST.

Syntax
      TZUTIL /g | /l | /s "TimeZoneValue[_dstoff]" | /?

Key
   /g   Display the current time zone value.

   /l   List all valid time zone values and display names in the following format:

   /s   Set the time zone to TimeZoneValue
        The _dstoff suffix will disable Daylight Savings Time adjustment
        for the time zone (where applicable).

   /?  Display help.

Offline

Board footer

Powered by