Commit b8bafa2c authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Use _timezone in _ftime64.

parent 61a1dae3
...@@ -769,17 +769,16 @@ void CDECL MSVCRT__ftime64(struct MSVCRT___timeb64 *buf) ...@@ -769,17 +769,16 @@ void CDECL MSVCRT__ftime64(struct MSVCRT___timeb64 *buf)
FILETIME ft; FILETIME ft;
ULONGLONG time; ULONGLONG time;
DWORD tzid = GetTimeZoneInformation(&tzinfo); _tzset_init();
GetSystemTimeAsFileTime(&ft); GetSystemTimeAsFileTime(&ft);
time = ((ULONGLONG)ft.dwHighDateTime << 32) | ft.dwLowDateTime; time = ((ULONGLONG)ft.dwHighDateTime << 32) | ft.dwLowDateTime;
buf->time = time / TICKSPERSEC - SECS_1601_TO_1970; buf->time = time / TICKSPERSEC - SECS_1601_TO_1970;
buf->millitm = (time % TICKSPERSEC) / TICKSPERMSEC; buf->millitm = (time % TICKSPERSEC) / TICKSPERMSEC;
buf->timezone = tzinfo.Bias + buf->timezone = MSVCRT___timezone / 60;
( tzid == TIME_ZONE_ID_STANDARD ? tzinfo.StandardBias : buf->dstflag = GetTimeZoneInformation(&tzinfo) == TIME_ZONE_ID_DAYLIGHT;
( tzid == TIME_ZONE_ID_DAYLIGHT ? tzinfo.DaylightBias : 0 ));
buf->dstflag = (tzid == TIME_ZONE_ID_DAYLIGHT?1:0);
} }
/********************************************************************* /*********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment