diff options
author | 2000-11-09 23:31:56 +0000 | |
---|---|---|
committer | 2000-11-09 23:31:56 +0000 | |
commit | 583f20d29f1de2c5f4a79ad3ac472c7d3713abc1 (patch) | |
tree | 28b23b80a3dd333c5332d174e3b07f4dd5fff7ba | |
parent | permit -Tps; aaron ok (diff) | |
download | wireguard-openbsd-583f20d29f1de2c5f4a79ad3ac472c7d3713abc1.tar.xz wireguard-openbsd-583f20d29f1de2c5f4a79ad3ac472c7d3713abc1.zip |
Fix an off-by-one-hour error that would occur when changing the time across
DST (Daylight Saving Time); from NetBSD.
-rw-r--r-- | bin/date/date.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/date/date.c b/bin/date/date.c index 29bbccd08ac..2cd84004f73 100644 --- a/bin/date/date.c +++ b/bin/date/date.c @@ -1,4 +1,4 @@ -/* $OpenBSD: date.c,v 1.15 2000/09/15 07:13:43 deraadt Exp $ */ +/* $OpenBSD: date.c,v 1.16 2000/11/09 23:31:56 aaron Exp $ */ /* $NetBSD: date.c,v 1.11 1995/09/07 06:21:05 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)date.c 8.2 (Berkeley) 4/28/95"; #else -static char rcsid[] = "$OpenBSD: date.c,v 1.15 2000/09/15 07:13:43 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: date.c,v 1.16 2000/11/09 23:31:56 aaron Exp $"; #endif #endif /* not lint */ @@ -170,6 +170,8 @@ setthetime(p) lt = localtime(&tval); + lt->tm_isdst = -1; /* correct for DST */ + if (dot != NULL) { /* .SS */ *dot++ = '\0'; if (strlen(dot) != 2) |