Author: gschneider
Date: Thu Aug 6 17:18:24 2009
New Revision: 42428
URL:
http://svn.reactos.org/svn/reactos?rev=42428&view=rev
Log:
Retrieve the timezone bias in mktime via GetTimeZoneInformation
Modified:
trunk/reactos/lib/sdk/crt/time/mktime.c
Modified: trunk/reactos/lib/sdk/crt/time/mktime.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/time/mktime.c?…
==============================================================================
--- trunk/reactos/lib/sdk/crt/time/mktime.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/time/mktime.c [iso-8859-1] Thu Aug 6 17:18:24 2009
@@ -18,6 +18,8 @@
struct tm *ptm2;
__time64_t time;
int mons, years, leapyears;
+ TIME_ZONE_INFORMATION tzi;
+ DWORD ret;
/* Normalize year and month */
if (ptm->tm_mon < 0)
@@ -84,7 +86,11 @@
*ptm = *ptm2;
/* Finally adjust by the difference to GMT in seconds */
- time += _timezone;
+ ret = GetTimeZoneInformation(&tzi);
+ if (ret != TIME_ZONE_ID_INVALID)
+ {
+ time += tzi.Bias * 60;
+ }
return time;
}