strptime: allow dates before 1900.
While struct tm makes things more confusing than they need to be, nothing in the API prevents handling those. So let's just accept them. Fixes some strange cases in the cookie test suite (with a cookie set to expire in year 101 B.C.)
This commit is contained in:
@@ -447,8 +447,6 @@ label:
|
||||
i -= 1900;
|
||||
if (c == 'y' && i < 69)
|
||||
i += 100;
|
||||
if (i < 0)
|
||||
return 0;
|
||||
|
||||
tm->tm_year = i;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user