From 3e1ee491f3fa4fa7e44a998799e251a3b08e66d2 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 8 Mar 2010 09:24:11 +1100 Subject: [PATCH] - djm@cvs.openbsd.org 2010/03/07 22:16:01 [ssh-keygen.c] make internal strptime string match strftime format; suggested by vinschen AT redhat.com and markus@ --- ChangeLog | 4 ++++ ssh-keygen.c | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b26749a1..707be2dd6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 20100307 - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2010/03/07 22:16:01 + [ssh-keygen.c] + make internal strptime string match strftime format; + suggested by vinschen AT redhat.com and markus@ - djm@cvs.openbsd.org 2010/03/07 22:01:32 [version.h] openssh-5.4 diff --git a/ssh-keygen.c b/ssh-keygen.c index fc7ca4b0c..dd662c907 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.183 2010/03/04 23:27:25 djm Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.184 2010/03/07 22:16:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland @@ -1254,12 +1254,12 @@ parse_absolute_time(const char *s) */ switch (strlen(s)) { case 8: - fmt = "%Y/%m/%d"; - snprintf(buf, sizeof(buf), "%.4s/%.2s/%.2s", s, s + 4, s + 6); + fmt = "%Y-%m-%d"; + snprintf(buf, sizeof(buf), "%.4s-%.2s-%.2s", s, s + 4, s + 6); break; case 14: - fmt = "%Y/%m/%d %H:%M:%S"; - snprintf(buf, sizeof(buf), "%.4s/%.2s/%.2s %.2s:%.2s:%.2s", + fmt = "%Y-%m-%dT%H:%M:%S"; + snprintf(buf, sizeof(buf), "%.4s-%.2s-%.2sT%.2s:%.2s:%.2s", s, s + 4, s + 6, s + 8, s + 10, s + 12); break; default: