diff options
author | Damien Miller <djm@mindrot.org> | 2010-03-08 09:24:11 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2010-03-08 09:24:11 +1100 |
commit | 3e1ee491f3fa4fa7e44a998799e251a3b08e66d2 (patch) | |
tree | 18e593da67ab1303ebbde451d4ef3f61dd74159a | |
parent | b3bc331e09c7b3617579a53980ca59feb99a8dd2 (diff) |
- 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@
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ssh-keygen.c | 10 |
2 files changed, 9 insertions, 5 deletions
@@ -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 fc7ca4b0..dd662c90 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 <ylo@cs.hut.fi> * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, 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: |