diff libpurple/util.c @ 20510:b77adb803eca

explicit merge of '7aea471c6710708afa40152f5fc3aaeda3d67e76' and 'de8f03b35895989d67321798cda909c34dfffc24'
author Richard Laager <rlaager@wiktel.com>
date Sun, 16 Sep 2007 17:59:57 +0000
parents 79d624f7c3ee 642f08c49042
children f489d760121f
line wrap: on
line diff
--- a/libpurple/util.c	Tue Sep 04 21:55:59 2007 +0000
+++ b/libpurple/util.c	Sun Sep 16 17:59:57 2007 +0000
@@ -514,23 +514,6 @@
  * Date/Time Functions
  **************************************************************************/
 
-#ifdef _WIN32
-static long win32_get_tz_offset() {
-	TIME_ZONE_INFORMATION tzi;
-	DWORD ret;
-	long off = -1;
-
-	if ((ret = GetTimeZoneInformation(&tzi)) != TIME_ZONE_ID_INVALID)
-	{
-		off = -(tzi.Bias * 60);
-		if (ret == TIME_ZONE_ID_DAYLIGHT)
-			off -= tzi.DaylightBias * 60;
-	}
-
-	return off;
-}
-#endif
-
 const char *purple_get_tzoff_str(const struct tm *tm, gboolean iso)
 {
 	static char buf[7];
@@ -545,7 +528,7 @@
 		g_return_val_if_reached("");
 
 #ifdef _WIN32
-	if ((off = win32_get_tz_offset()) == -1)
+	if ((off = wpurple_get_tz_offset()) == -1)
 		return "";
 #else
 # ifdef HAVE_TM_GMTOFF
@@ -853,7 +836,7 @@
 #endif
 
 #ifdef _WIN32
-				if ((sys_tzoff = win32_get_tz_offset()) == -1)
+				if ((sys_tzoff = wpurple_get_tz_offset()) == -1)
 					tzoff = PURPLE_NO_TZ_OFF;
 				else
 					tzoff += sys_tzoff;