[gaim-migrate @ 15966]

Tue, 04 Apr 2006 23:54:19 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Tue, 04 Apr 2006 23:54:19 +0000
changeset 13585
b0752c839d60
parent 13584
f82188ed84f6
child 13586
04f2b57b5270

[gaim-migrate @ 15966]
Fix the Windows log viewer timestamps-are-off-by-my-GMT-offset bug.

src/util.c file | annotate | diff | comparison | revisions
--- 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;

mercurial