There's still the following problem, if "Automatic change for daylight saving time" in Windows is active (I'm using Windows 7)
In case of using "change timestamp" and choose a date which is within the other seasonal time of the current computer's time, than a 1h-wrong time is allocated to the file.
Example: today (July 18th) daylight saving time is active, but I want to change the timestamp of a file which was shot on January 1st (no daylight saving time) to 12.00h:
XnView by mistake allocates a timestamp of 11.00h
Screen.jpg
You do not have the required permissions to view the files attached to this post.
I found a Perl package called Win32::UTCFileTime that supposedly patches the stat() and utime() library functions to fix this Windows deficiency.
Now the bad news:
The Win32::UTCFileTime routines may be called with a file name only, and don't support being called with a file handle, which ExifTool requires.
The Win32::UTCFileTime routines don't override the Perl file test operators, so I would need to change all these to stat() calls in the code, which would be ugly.
but here is the real killer:
On my Windows development machine (XP SP2) with ""Automatically Adjust for Daylight Savings Time" enabled, the ExifTool FileModifyDate matches exactly that reported by Windows Explorer for files on an NTFS filesystem, even when I change the system date/time in and out of DST. But with the Win32::UTCFileTime patch, the stat() times change so they no longer match those reported by Windows Explorer.
This last point is huge. I am guessing that Microsoft changed the time zone handling some time after XP SP2, which makes this a Windows-version-dependent or Windows-settings-dependent problem. Given that ExifTool seems to report the correct FileModifyDate on my development system, I am lothe to change this behaviour and break the backward compatibility for systems like the one I am running.
So the bottom line is that I don't see any good way that I can patch this Windows problem.
Import the applicable TZI and annual rules into the registry under the following registry subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones Note If registry value does not exist, import the English string into the registry under the following registry subkey for the "Non-MUI_*" string (for example: "Display", "Dlt", "Std" registry keys): HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones
Run the appropriate command for your operating system: Windows XP and Windows Server 2003
Tzchange.exe /w 2147483648
Windows Vista, Windows 7, Windows Server 2008 and Windows Server 2008 R2
Sorry, I should have mentioned that I've done my tests on XP SP3 (with KB2904266 installed) where the problem also seems to depend on whether or not Automatically adjust clock for daylight saving time (Control Panel » Date and Time » Time Zone) is activated.
p133205_1.png
p133205_2.png
You do not have the required permissions to view the files attached to this post.