Core: DST FileTime fix (thanks koldo)

git-svn-id: svn://ultimatepp.org/upp/trunk@11871 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2018-03-29 10:27:29 +00:00
parent 26dd6c9355
commit e36065ed74

View file

@ -418,15 +418,17 @@ void Time::Serialize(Stream& s)
}
#ifdef PLATFORM_WIN32
Time::Time(FileTime filetime) {
SYSTEMTIME tm;
Time::Time(FileTime filetime)
{
SYSTEMTIME tm, tml;
FileTime ft;
FileTimeToLocalFileTime(&filetime, &ft);
FileTimeToSystemTime(&ft, &tm);
*this = Time(tm.wYear, tm.wMonth, tm.wDay, tm.wHour, tm.wMinute, tm.wSecond);
FileTimeToSystemTime(&filetime, &tm);
SystemTimeToTzSpecificLocalTime(NULL, &tm, &tml);
*this = Time(tml.wYear, tml.wMonth, tml.wDay, tml.wHour, tml.wMinute, tml.wSecond);
}
FileTime Time::AsFileTime() const {
FileTime Time::AsFileTime() const
{
SYSTEMTIME tm;
tm.wYear = year;
tm.wMonth = month;