summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2010-04-10 16:43:19 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2010-04-10 16:43:19 +0000
commit213dfd0c0fd45f3368024a3e56291af52618c8dc (patch)
tree36399afa71a39a4fdd90aed4deeda965555aefe3
parent4be2a4e014dbfc4c94b74321305c75736a426b35 (diff)
Fix bug in GMT calculation for systems without tm_gmtoff.
From Javier Fernandez-Sanguino Pena
-rw-r--r--usr.sbin/cron/misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/cron/misc.c b/usr.sbin/cron/misc.c
index 95af92ca790..204b3429f85 100644
--- a/usr.sbin/cron/misc.c
+++ b/usr.sbin/cron/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.41 2010/03/30 13:13:33 jacekm Exp $ */
+/* $OpenBSD: misc.c,v 1.42 2010/04/10 16:43:18 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@@ -681,7 +681,7 @@ long get_gmtoff(time_t *clock, struct tm *local)
if (local->tm_year < gmt.tm_year)
offset -= 24 * 3600;
else if (local->tm_year > gmt.tm_year)
- offset -= 24 * 3600;
+ offset += 24 * 3600;
else if (local->tm_yday < gmt.tm_yday)
offset -= 24 * 3600;
else if (local->tm_yday > gmt.tm_yday)