diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-11-09 23:31:57 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-11-09 23:31:57 +0000 |
commit | e9bf2211646b7f1e48658646eb8b7ad6fbae0012 (patch) | |
tree | 9523a178a17a26093a68e4fc04e8f71e8d9be2cd /bin/date | |
parent | ebabaa35daabaa0b862617063e290eef13e3a25e (diff) |
Fix an off-by-one-hour error that would occur when changing the time across
DST (Daylight Saving Time); from NetBSD.
Diffstat (limited to 'bin/date')
-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) |