r1785 - trunk/varnish-cache/lib/libvarnish

des at projects.linpro.no des at projects.linpro.no
Mon Jul 30 15:50:17 CEST 2007


Author: des
Date: 2007-07-30 15:50:16 +0200 (Mon, 30 Jul 2007)
New Revision: 1785

Modified:
   trunk/varnish-cache/lib/libvarnish/time.c
Log:
Use mktime() rather than the unportable timegm().  The downside is that we're
at the mercy of the TZ environment variable.


Modified: trunk/varnish-cache/lib/libvarnish/time.c
===================================================================
--- trunk/varnish-cache/lib/libvarnish/time.c	2007-07-30 09:49:05 UTC (rev 1784)
+++ trunk/varnish-cache/lib/libvarnish/time.c	2007-07-30 13:50:16 UTC (rev 1785)
@@ -113,7 +113,7 @@
 	for (r = fmts; *r != NULL; r++) {
 		memset(&tm, 0, sizeof tm);
 		if (strptime(p, *r, &tm) != NULL)
-			return(timegm(&tm));
+			return (mktime(&tm));
 	}
 	return (0);
 }




More information about the varnish-commit mailing list