kernel32: Fixed DosDateTimeToFileTime behavior when timegm() is missing.
The tm_isdst field needs to be initialized for mktime to do the right thing.
This commit is contained in:
parent
7e2228f15a
commit
849ee1c2bb
@ -972,6 +972,7 @@ BOOL WINAPI DosDateTimeToFileTime( WORD fatdate, WORD fattime, LPFILETIME ft)
|
|||||||
newtm.tm_mday = (fatdate & 0x1f);
|
newtm.tm_mday = (fatdate & 0x1f);
|
||||||
newtm.tm_mon = ((fatdate >> 5) & 0x0f) - 1;
|
newtm.tm_mon = ((fatdate >> 5) & 0x0f) - 1;
|
||||||
newtm.tm_year = (fatdate >> 9) + 80;
|
newtm.tm_year = (fatdate >> 9) + 80;
|
||||||
|
newtm.tm_isdst = -1;
|
||||||
#ifdef HAVE_TIMEGM
|
#ifdef HAVE_TIMEGM
|
||||||
RtlSecondsSince1970ToTime( timegm(&newtm), (LARGE_INTEGER *)ft );
|
RtlSecondsSince1970ToTime( timegm(&newtm), (LARGE_INTEGER *)ft );
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user