gaim/gaim
Clone
Summary
Browse
Changes
Graph
Fix win32 timezone suckage.
oldstatus
2005-06-09, Daniel Atallah
bf27d9d1b677
Parents
9488bb275829
Children
a256cccb1d55
Fix win32 timezone suckage.
1 files changed, 12 insertions(+), 0 deletions(-)
+12
-0
src/util.c
--- a/src/util.c Wed Jun 08 22:23:38 2005 -0400
+++ b/src/util.c Thu Jun 09 00:00:36 2005 -0400
@@ -555,6 +555,17 @@
t->tm_isdst = -1;
if (tzoff || utc) {
+#ifdef _WIN32
+ TIME_ZONE_INFORMATION tzi;
+ DWORD ret;
+ if ((ret = GetTimeZoneInformation(&tzi))
+ != TIME_ZONE_ID_INVALID) {
+ tzoff -= tzi.Bias * 60;
+ if (ret == TIME_ZONE_ID_DAYLIGHT) {
+ tzoff -= tzi.DaylightBias * 60;
+ }
+ }
+#else
#ifdef HAVE_TM_GMTOFF
tzoff += t->tm_gmtoff;
#else
@@ -564,6 +575,7 @@
t->tm_isdst = 0; /* I think this might fix it */
# endif
#endif
+#endif /* _WIN32 */
}
}
}