diff options
-rw-r--r-- | usr.bin/chpass/util.c | 5 | ||||
-rw-r--r-- | usr.sbin/user/user.c | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/chpass/util.c b/usr.bin/chpass/util.c index d100844d8fc..bd7006510e4 100644 --- a/usr.bin/chpass/util.c +++ b/usr.bin/chpass/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.9 2008/10/09 18:33:15 chl Exp $ */ +/* $OpenBSD: util.c,v 1.10 2008/12/16 05:25:55 guenther Exp $ */ /* $NetBSD: util.c,v 1.4 1995/03/26 04:55:35 glass Exp $ */ /*- @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)util.c 8.4 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: util.c,v 1.9 2008/10/09 18:33:15 chl Exp $"; +static char rcsid[] = "$OpenBSD: util.c,v 1.10 2008/12/16 05:25:55 guenther Exp $"; #endif #endif /* not lint */ @@ -80,6 +80,7 @@ atot(char *p, time_t *store) t = strptime(p, "%B %d %Y", &tm); if (t == NULL || (*t != '\0' && *t != '\n')) return 1; + tm.tm_isdst = -1; *store = mktime(&tm); if (*store == (time_t) -1) return 1; diff --git a/usr.sbin/user/user.c b/usr.sbin/user/user.c index 34397055e70..712e6c2c28a 100644 --- a/usr.sbin/user/user.c +++ b/usr.sbin/user/user.c @@ -1,4 +1,4 @@ -/* $OpenBSD: user.c,v 1.73 2008/10/09 21:10:08 miod Exp $ */ +/* $OpenBSD: user.c,v 1.74 2008/12/16 05:25:55 guenther Exp $ */ /* $NetBSD: user.c,v 1.69 2003/04/14 17:40:07 agc Exp $ */ /* @@ -911,6 +911,7 @@ scantime(time_t *tp, char *s) *tp = 0; if (s != NULL) { (void) memset(&tm, 0, sizeof(tm)); + tm.tm_isdst = -1; if (strptime(s, "%c", &tm) != NULL) { *tp = mktime(&tm); } else if (strptime(s, "%B %d %Y", &tm) != NULL) { |