# HG changeset patch # User Daniel Atallah # Date 1118289800 0 # Node ID a8a7730db73c45001bd5317b0954c64d90bae16d # Parent ecc0f22db5109d68dbfbbd6ea865a7aba878c7c0 [gaim-migrate @ 12824] Fix win32 timezone suckage. committer: Tailor Script diff -r ecc0f22db510 -r a8a7730db73c src/util.c --- a/src/util.c Thu Jun 09 03:58:58 2005 +0000 +++ b/src/util.c Thu Jun 09 04:03:20 2005 +0000 @@ -556,6 +556,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 @@ -565,6 +576,7 @@ t->tm_isdst = 0; /* I think this might fix it */ # endif #endif +#endif /* _WIN32 */ } } }