summaryrefslogtreecommitdiff
path: root/time/strptime.c
diff options
context:
space:
mode:
Diffstat (limited to 'time/strptime.c')
-rw-r--r--time/strptime.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/time/strptime.c b/time/strptime.c
index 90b88a1ba3..8d650716fe 100644
--- a/time/strptime.c
+++ b/time/strptime.c
@@ -541,7 +541,10 @@ strptime_internal (buf, format, tm, decided)
break;
case 'Y':
/* Match year including century number. */
- get_number (0, INT_MAX);
+ if (sizeof (time_t) > 4)
+ get_number (0, 9999);
+ else
+ get_number (0, 2036);
tm->tm_year = val - 1900;
break;
case 'Z':