From 75c07011b7c4d06acd7b45dabdcd60ab9d80f385 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:29:28 +0200 Subject: 5.23 --- zen/format_unit.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'zen/format_unit.cpp') 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(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, -- cgit