mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-19 14:16:46 -06:00
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:
parent
26dd6c9355
commit
e36065ed74
1 changed files with 8 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue