Piotr Caban : msvcrt: Use _timezone in _ftime64.
Module: wine Branch: master Commit: b8bafa2c58f69043debe9c7a962eb5f04dee0ca5 URL: https://source.winehq.org/git/wine.git/?a=commit;h=b8bafa2c58f69043debe9c7a9... Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Dec 21 12:44:26 2018 +0100 msvcrt: Use _timezone in _ftime64. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/time.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c index 861b2ed..1fee0a9 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -769,17 +769,16 @@ void CDECL MSVCRT__ftime64(struct MSVCRT___timeb64 *buf) FILETIME ft; ULONGLONG time; - DWORD tzid = GetTimeZoneInformation(&tzinfo); + _tzset_init(); + GetSystemTimeAsFileTime(&ft); time = ((ULONGLONG)ft.dwHighDateTime << 32) | ft.dwLowDateTime; buf->time = time / TICKSPERSEC - SECS_1601_TO_1970; buf->millitm = (time % TICKSPERSEC) / TICKSPERMSEC; - buf->timezone = tzinfo.Bias + - ( tzid == TIME_ZONE_ID_STANDARD ? tzinfo.StandardBias : - ( tzid == TIME_ZONE_ID_DAYLIGHT ? tzinfo.DaylightBias : 0 )); - buf->dstflag = (tzid == TIME_ZONE_ID_DAYLIGHT?1:0); + buf->timezone = MSVCRT___timezone / 60; + buf->dstflag = GetTimeZoneInformation(&tzinfo) == TIME_ZONE_ID_DAYLIGHT; } /*********************************************************************
participants (1)
-
Alexandre Julliard