diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ssh-keygen.c | 10 |
2 files changed, 9 insertions, 5 deletions
@@ -1,5 +1,9 @@ | |||
1 | 20100307 | 1 | 20100307 |
2 | - (djm) OpenBSD CVS Sync | 2 | - (djm) OpenBSD CVS Sync |
3 | - djm@cvs.openbsd.org 2010/03/07 22:16:01 | ||
4 | [ssh-keygen.c] | ||
5 | make internal strptime string match strftime format; | ||
6 | suggested by vinschen AT redhat.com and markus@ | ||
3 | - djm@cvs.openbsd.org 2010/03/07 22:01:32 | 7 | - djm@cvs.openbsd.org 2010/03/07 22:01:32 |
4 | [version.h] | 8 | [version.h] |
5 | openssh-5.4 | 9 | 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 @@ | |||
1 | /* $OpenBSD: ssh-keygen.c,v 1.183 2010/03/04 23:27:25 djm Exp $ */ | 1 | /* $OpenBSD: ssh-keygen.c,v 1.184 2010/03/07 22:16:01 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -1254,12 +1254,12 @@ parse_absolute_time(const char *s) | |||
1254 | */ | 1254 | */ |
1255 | switch (strlen(s)) { | 1255 | switch (strlen(s)) { |
1256 | case 8: | 1256 | case 8: |
1257 | fmt = "%Y/%m/%d"; | 1257 | fmt = "%Y-%m-%d"; |
1258 | snprintf(buf, sizeof(buf), "%.4s/%.2s/%.2s", s, s + 4, s + 6); | 1258 | snprintf(buf, sizeof(buf), "%.4s-%.2s-%.2s", s, s + 4, s + 6); |
1259 | break; | 1259 | break; |
1260 | case 14: | 1260 | case 14: |
1261 | fmt = "%Y/%m/%d %H:%M:%S"; | 1261 | fmt = "%Y-%m-%dT%H:%M:%S"; |
1262 | snprintf(buf, sizeof(buf), "%.4s/%.2s/%.2s %.2s:%.2s:%.2s", | 1262 | snprintf(buf, sizeof(buf), "%.4s-%.2s-%.2sT%.2s:%.2s:%.2s", |
1263 | s, s + 4, s + 6, s + 8, s + 10, s + 12); | 1263 | s, s + 4, s + 6, s + 8, s + 10, s + 12); |
1264 | break; | 1264 | break; |
1265 | default: | 1265 | default: |