projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7dc0214
)
Retrieve the timezone bias in mktime via GetTimeZoneInformation
author
Gregor Schneider
<grschneider@gmail.com>
Thu, 6 Aug 2009 15:18:24 +0000
(15:18 +0000)
committer
Gregor Schneider
<grschneider@gmail.com>
Thu, 6 Aug 2009 15:18:24 +0000
(15:18 +0000)
svn path=/trunk/; revision=42428
reactos/lib/sdk/crt/time/mktime.c
patch
|
blob
|
history
diff --git
a/reactos/lib/sdk/crt/time/mktime.c
b/reactos/lib/sdk/crt/time/mktime.c
index
619a700
..
f7217c4
100644
(file)
--- a/
reactos/lib/sdk/crt/time/mktime.c
+++ b/
reactos/lib/sdk/crt/time/mktime.c
@@
-18,6
+18,8
@@
mktime_worker(struct tm * ptm, int utc)
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
@@
mktime_worker(struct tm * ptm, int utc)
*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;
}