summaryrefslogtreecommitdiff
path: root/zen/format_unit.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:29:28 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:29:28 +0200
commit75c07011b7c4d06acd7b45dabdcd60ab9d80f385 (patch)
tree8853c3978dd152ef377e652239448b1352320206 /zen/format_unit.cpp
parent5.22 (diff)
downloadFreeFileSync-75c07011b7c4d06acd7b45dabdcd60ab9d80f385.tar.gz
FreeFileSync-75c07011b7c4d06acd7b45dabdcd60ab9d80f385.tar.bz2
FreeFileSync-75c07011b7c4d06acd7b45dabdcd60ab9d80f385.zip
5.23
Diffstat (limited to 'zen/format_unit.cpp')
-rw-r--r--zen/format_unit.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/zen/format_unit.cpp b/zen/format_unit.cpp
index 4b39d5a9..1568b616 100644
--- a/zen/format_unit.cpp
+++ b/zen/format_unit.cpp
@@ -287,11 +287,12 @@ std::wstring zen::utcToLocalTimeString(Int64 utcTime)
auto errorMsg = [&] { return _("Error") + L" (time_t: " + numberTo<std::wstring>(utcTime) + L")"; };
#ifdef ZEN_WIN
- FILETIME lastWriteTimeUtc = tofiletime(utcTime); //convert ansi C time to FILETIME
+ FILETIME lastWriteTimeUtc = toFileTime(utcTime); //convert ansi C time to FILETIME
SYSTEMTIME systemTimeLocal = {};
- if (useNewLocalTimeCalculation) //use DST setting from source date (like in Windows 7, see http://msdn.microsoft.com/en-us/library/ms724277(VS.85).aspx
+ //http://msdn.microsoft.com/en-us/library/ms724277(VS.85).aspx
+ if (useNewLocalTimeCalculation) //DST conversion like in Windows 7: NTFS stays fixed, but FAT jumps by one hour
{
SYSTEMTIME systemTimeUtc = {};
if (!::FileTimeToSystemTime(&lastWriteTimeUtc, //__in const FILETIME *lpFileTime,
@@ -303,7 +304,7 @@ std::wstring zen::utcToLocalTimeString(Int64 utcTime)
&systemTimeLocal)) //__out LPSYSTEMTIME lpLocalTime
return errorMsg();
}
- else //use DST setting (like in Windows 2000 and XP)
+ else //DST conversion like in Windows 2000 and XP: FAT times stay fixed, while NTFS jumps
{
FILETIME fileTimeLocal = {};
if (!::FileTimeToLocalFileTime(&lastWriteTimeUtc, //_In_ const FILETIME *lpFileTime,
bgstack15