[openssh-commits] [openssh] 03/03: upstream: Correct handling of DST when converting dates
git+noreply at mindrot.org
git+noreply at mindrot.org
Tue Sep 15 18:35:03 AEST 2026
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit aef20dfe30e68a469911a229b9117e7134766311
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Tue Sep 15 08:31:46 2026 +0000
upstream: Correct handling of DST when converting dates
Timestamps conversion was ignoring Daylight Savings Time (DST) causing
date conversions to be +/-1 hour under some circumstances.
bz4004; from Khush Patel, ok deraadt
OpenBSD-Commit-ID: bd5eb2603c04d4b5072b0e593b137a98ef75b731
---
misc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/misc.c b/misc.c
index 2c6115f3a..b41984de4 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.217 2026/09/15 08:26:49 job Exp $ */
+/* $OpenBSD: misc.c,v 1.218 2026/09/15 08:31:46 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2005-2020 Damien Miller. All rights reserved.
@@ -2593,6 +2593,7 @@ parse_absolute_time(const char *s, uint64_t *tp)
return SSH_ERR_INVALID_FORMAT;
} else {
tm.tm_wday = -1; /* sentinel for error */
+ tm.tm_isdst = -1; /* mktime decides DST */
if ((tt = mktime(&tm)) == -1 && tm.tm_wday == -1)
return SSH_ERR_INVALID_FORMAT;
}
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list