changeset 13584:097ae11c67e0

[gaim-migrate @ 15966] Fix the Windows log viewer timestamps-are-off-by-my-GMT-offset bug. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Tue, 04 Apr 2006 23:54:19 +0000
parents 69264c313521
children ffb12e85473f
files src/util.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/util.c	Tue Apr 04 23:53:25 2006 +0000
+++ b/src/util.c	Tue Apr 04 23:54:19 2006 +0000
@@ -801,14 +801,20 @@
 
 			if (tzoff != GAIM_NO_TZ_OFF || utc)
 			{
+#if defined(_WIN32)
+				long sys_tzoff;
+#endif
+
 #if defined(_WIN32) || defined(HAVE_TM_GMTOFF) || defined (HAVE_TIMEZONE)
 				if (tzoff == GAIM_NO_TZ_OFF)
 					tzoff = 0;
 #endif
 
 #ifdef _WIN32
-				if ((tzoff = win32_get_tz_offset()) == -1)
+				if ((sys_tzoff = win32_get_tz_offset()) == -1)
 					tzoff = GAIM_NO_TZ_OFF;
+				else
+					tzoff += sys_tzoff;
 #else
 #ifdef HAVE_TM_GMTOFF
 				tzoff += t->tm_gmtoff;