[TC 10 b4] Change date/time issue

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
deus-ex
Power Member
Power Member
Posts: 969
Joined: 2003-02-10, 17:45 UTC

[TC 10 b4] Change date/time issue

Post by *deus-ex »

Total Commander v10.00 beta 4 64-bit, Windows 10 Pro 64-bit 20H2 Build 19042.906:

I just encountered a weird issue regarding the 'change date/time stamp' function. I wanted to change the date and time stamp of some files and subfolders to '28/3/2021 02:16', but the result always would be off by one hour less, '28/3/2021 01:16'.

Further tests with different values revealed that with the date 28/3/2021 you cannot set the time to anything between 02:00:00 - 02:59:59. Changing the date to anything else than 28/3/2021 allows to apply a timestamp between 02:00:00 - 02:59:59, it is sufficient to just change either the day, month or year.

I'm able to reproduce this with TC v9.51, so it is not a TC v10.00 beta issue per se.

EDIT: Exchanged the word 'bug' to 'issue'
Last edited by deus-ex on 2021-04-08, 10:19 UTC, edited 2 times in total.
Dennis_Stevens
Senior Member
Senior Member
Posts: 215
Joined: 2013-06-08, 16:16 UTC
Location: NRW, Germany

Re: [TC 10 b4] Change date/time bug

Post by *Dennis_Stevens »

Might be a coincidence .... but in 2021 the 28/3 had no 02:16 in central europe. There was only 01:59 and 03:00 ... because the clocks were set to CEST.
Last edited by Dennis_Stevens on 2021-04-08, 10:23 UTC, edited 1 time in total.
#230412 Single User Licence
Commanding Win10 64bit totally with version 11
User avatar
deus-ex
Power Member
Power Member
Posts: 969
Joined: 2003-02-10, 17:45 UTC

Re: [TC 10 b4] Change date/time issue

Post by *deus-ex »

Hi Dennis, thanks for joining the discussion.

Yes, I thought of that, too. I checked with Window's File Manager which behaves the same, it displays the file timestamp as '01:16' instead of '02:16'. I also checked with an older version of the FAR file manager v.2.0.0.1807 from 03/02/2017 (originally by the RAR archiver author), which displays the entered timestamp as '02:16'.

Perhaps this behaviour is controlled by Windows, depending on the configured timezone?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 10 b4] Change date/time issue

Post by *ghisler(Author) »

Windows stores timstamps as a large ineger value: 100-nanosecond ticks since 1 January 1601 00:00:00.

When you convert from a time in the form 28/3/2021 02:16 to this integer value, it will work even for invalid times. Two invalid times can result in the same timestamp value.
When you convert it back, there will be only one valid time representation.
Author of Total Commander
https://www.ghisler.com
Post Reply