Akihiro Sagawa : kernel32: Use Rtl function when the time zone name is useless.

Alexandre Julliard julliard at winehq.org
Mon Dec 17 15:36:39 CST 2018


Module: wine
Branch: master
Commit: 2ce076a502e97475a330cde793d0a1eb13d051f1
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2ce076a502e97475a330cde793d0a1eb13d051f1

Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date:   Tue Dec 18 00:31:45 2018 +0900

kernel32: Use Rtl function when the time zone name is useless.

Signed-off-by: Akihiro Sagawa <sagawa.aki at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/time.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/dlls/kernel32/time.c b/dlls/kernel32/time.c
index 69ebd82..c425eb8 100644
--- a/dlls/kernel32/time.c
+++ b/dlls/kernel32/time.c
@@ -689,8 +689,7 @@ BOOL WINAPI SystemTimeToTzSpecificLocalTime(
     }
     else
     {
-        if (GetTimeZoneInformation(&tzinfo) == TIME_ZONE_ID_INVALID)
-            return FALSE;
+        RtlQueryTimeZoneInformation((RTL_TIME_ZONE_INFORMATION *)&tzinfo);
     }
 
     if (!SystemTimeToFileTime(lpUniversalTime, &ft))
@@ -735,8 +734,7 @@ BOOL WINAPI TzSpecificLocalTimeToSystemTime(
     }
     else
     {
-        if (GetTimeZoneInformation(&tzinfo) == TIME_ZONE_ID_INVALID)
-            return FALSE;
+        RtlQueryTimeZoneInformation((RTL_TIME_ZONE_INFORMATION *)&tzinfo);
     }
 
     if (!SystemTimeToFileTime(lpLocalTime, &ft))
@@ -1314,7 +1312,8 @@ VOID WINAPI GetSystemTime(LPSYSTEMTIME systime)
 BOOL WINAPI GetDaylightFlag(void)
 {
     TIME_ZONE_INFORMATION tzinfo;
-    return GetTimeZoneInformation( &tzinfo) == TIME_ZONE_ID_DAYLIGHT;
+    RtlQueryTimeZoneInformation((RTL_TIME_ZONE_INFORMATION *)&tzinfo);
+    return (TIME_ZoneID(&tzinfo) == TIME_ZONE_ID_DAYLIGHT);
 }
 
 /***********************************************************************




More information about the wine-cvs mailing list