Important: This thread is not about returning any timestamps to TC but handling them within a plugin.
The thread Wrong timestamp in RAR files modified in other time zone got me thinking about the method of retrieving the file times in my Startups plugin. Currently it uses GetFileAttributesEx() to retrieve the file times, which are then converted to local time via FileTimeToLocalFileTime(). This produces the same results as in Explorer and TC, but only on Win2k and XP (on FAT32 and NTFS). On Win7 the times are one hour off for some of the files, depending on DST, regardless of file-system.
Because of this I changed the implementation to use FileTimeToSystemTime() and SystemTimeToTzSpecificLocalTime() functions. Now the timestamps are correct (i.e. the same as in Explorer/TC) on Win7 but not anymore on Win2k and XP


What's the correct way to do it? How does TC do it?
[EDIT] Typo [/EDIT]
Regards
Dalai