Module Name: src
Committed By: christos
Date: Tue Dec 8 12:51:04 UTC 2015
Modified Files:
src/lib/libutil: parsedate.y
Log Message:
preserve a copy of the tm so we can check later.
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libutil/parsedate.y
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libutil/parsedate.y
diff -u src/lib/libutil/parsedate.y:1.23 src/lib/libutil/parsedate.y:1.24
--- src/lib/libutil/parsedate.y:1.23 Mon Dec 7 15:55:49 2015
+++ src/lib/libutil/parsedate.y Tue Dec 8 07:51:04 2015
@@ -14,7 +14,7 @@
#include <sys/cdefs.h>
#ifdef __RCSID
-__RCSID("$NetBSD: parsedate.y,v 1.23 2015/12/07 20:55:49 christos Exp $");
+__RCSID("$NetBSD: parsedate.y,v 1.24 2015/12/08 12:51:04 christos Exp $");
#endif
#include <stdio.h>
@@ -675,10 +675,12 @@ Convert(
case DSToff: tm.tm_isdst = 0; break;
default: tm.tm_isdst = -1; break;
}
+ otm = tm;
result = mktime(&tm);
} else {
/* We rely on mktime_z(NULL, ...) working in UTC */
tm.tm_isdst = 0; /* hence cannot be summer time */
+ otm = tm;
errno = 0;
result = mktime_z(NULL, &tm);
if (result != -1 || errno == 0) {