- 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@
This commit is contained in:
parent
b3bc331e09
commit
3e1ee491f3
|
@ -1,5 +1,9 @@
|
||||||
20100307
|
20100307
|
||||||
- (djm) OpenBSD CVS Sync
|
- (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
|
- djm@cvs.openbsd.org 2010/03/07 22:01:32
|
||||||
[version.h]
|
[version.h]
|
||||||
openssh-5.4
|
openssh-5.4
|
||||||
|
|
10
ssh-keygen.c
10
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>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
|
@ -1254,12 +1254,12 @@ parse_absolute_time(const char *s)
|
||||||
*/
|
*/
|
||||||
switch (strlen(s)) {
|
switch (strlen(s)) {
|
||||||
case 8:
|
case 8:
|
||||||
fmt = "%Y/%m/%d";
|
fmt = "%Y-%m-%d";
|
||||||
snprintf(buf, sizeof(buf), "%.4s/%.2s/%.2s", s, s + 4, s + 6);
|
snprintf(buf, sizeof(buf), "%.4s-%.2s-%.2s", s, s + 4, s + 6);
|
||||||
break;
|
break;
|
||||||
case 14:
|
case 14:
|
||||||
fmt = "%Y/%m/%d %H:%M:%S";
|
fmt = "%Y-%m-%dT%H:%M:%S";
|
||||||
snprintf(buf, sizeof(buf), "%.4s/%.2s/%.2s %.2s:%.2s:%.2s",
|
snprintf(buf, sizeof(buf), "%.4s-%.2s-%.2sT%.2s:%.2s:%.2s",
|
||||||
s, s + 4, s + 6, s + 8, s + 10, s + 12);
|
s, s + 4, s + 6, s + 8, s + 10, s + 12);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue