summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-03-17 09:04:52 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-03-17 09:04:52 +0000
commitfeb17dbe627dd6e51e366844d44871ad33c854c0 (patch)
treeba19f39814a370d4391049fee92c112f6bcf743b /lib
parentfb4976f5647be03f08f9ab0cf7f797edaf7bcac7 (diff)
Make %Y override an earlier %y (%y stuff gets delayed due to century specs).
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/time/strptime.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/time/strptime.c b/lib/libc/time/strptime.c
index 996d212b9e8..6854137aa58 100644
--- a/lib/libc/time/strptime.c
+++ b/lib/libc/time/strptime.c
@@ -36,7 +36,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: strptime.c,v 1.3 1998/03/15 23:31:00 millert Exp $";
+static char rcsid[] = "$OpenBSD: strptime.c,v 1.4 1998/03/17 09:04:51 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/localedef.h>
@@ -329,6 +329,7 @@ literal:
if (!(_conv_num(&bp, &i, 0, INT_MAX)))
return (0);
+ relyear = -1;
tm->tm_year = i - TM_YEAR_BASE;
break;