[cvslog] (2004-10-17 05:44:23 UTC) Module eggdrop1.9: Change committed!

cvslog cvs at tsss.org
Sat Oct 16 23:44:23 CST 2004


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.9
Commit time: 2004-10-17 05:44:23 UTC
Commited by: stdarg <stdarg at techmonkeys.org>

Modified files:
     lib/eggdrop/date.c

Log message:

* An easier way to get the timezone...

---------------------- diff included ----------------------
Index: eggdrop1.9/lib/eggdrop/date.c
diff -u eggdrop1.9/lib/eggdrop/date.c:1.1 eggdrop1.9/lib/eggdrop/date.c:1.2
--- eggdrop1.9/lib/eggdrop/date.c:1.1	Sun Oct 17 00:14:06 2004
+++ eggdrop1.9/lib/eggdrop/date.c	Sun Oct 17 00:44:13 2004
@@ -388,13 +388,8 @@
 
 int date_timezone(time_t time)
 {
-	struct tm *tm = localtime(&time);
-	int timezone = -(tm->tm_gmtoff/60);
-
-	/* Adjust for daylight savings. */
-	if (tm->tm_isdst) timezone += 60;
-
-	return(timezone);
+	localtime(0);
+	return(timezone/60);
 }
 
 static time_t
----------------------- End of diff -----------------------



More information about the Changes mailing list