Using TC 8 on Windows 7 i recently noticed a strange date/time behavior.
I have a FS-Plugin, where i return virtual files with a special Date to TC in the FindFirst/FindNext loop.
In practice i build a virtual file list with german holidays.
For example:
FileName Date
------------------------------------
1.Christmas-Day 25.12.2012 0:00
2.Christmas-Day 26.12.2012 0:00
Since TC8 on Windows 7 i see a Date/Time with 1 hour less than expected.
This occurs only for Date/Time outside the DST (Daylight Saving Time)
The result is now 24.12.2012 23:00 for the 1.Christmas-Day and the same 1 hour difference with the 2.Christmas-Day.
Searching the forum pointed me to the new configuration "NewTimeZoneMethod",
which defaults to 1 for Windows 7, and defaults to 0 for Vista (because on Vista i cannot reproduce the problem, if the setting is missing in the ini)
For my special case, this new behavior is wrong.
Of course, i could set NewTimeZoneMethod=0 for myself, but i cannot guarantee it's set for other users of my plugin.
The only workaround i can see is to read the NewTimeZoneMethod from ini and if it is set to 1 then add one hour to the timestamp, if we are in DST (Daylight Saving Time).
Are there any better ways to solve the problem?
1 hour date/time diff since TC8 in Windows 7
Moderators: Hacker, petermad, Stefan2, white
-
- Member
- Posts: 103
- Joined: 2005-06-21, 00:42 UTC
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
This is a difficult question which even Microsoft couldn't resolve - actually different time zone conversion methods would be needed when the timestamp is stored as local time (e.g. FAT32) and when it's stored as UTC (Greenwhich mean time). I do not have a solution to this problem either. Internally, TC stores timestamps as UTC, and converts them to local time only when displaying them in the file lists.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com