mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Leap days -> leap years
This commit is contained in:
parent
1ebb66269f
commit
b2a67d8e5b
@ -1248,8 +1248,8 @@ timegm (struct tm *t)
|
|||||||
return (time_t) -1;
|
return (time_t) -1;
|
||||||
|
|
||||||
days = 365 * (t->tm_year - 70);
|
days = 365 * (t->tm_year - 70);
|
||||||
/* Take into account the leap days between 1970 and YEAR-1; all
|
/* Take into account leap years between 1970 and YEAR-1; all years
|
||||||
years divisible by four between 1968 and 2100 should be leap. */
|
divisible by four between 1968 and 2100 should be leap. */
|
||||||
days += (t->tm_year - 1 - 68) / 4;
|
days += (t->tm_year - 1 - 68) / 4;
|
||||||
if (t->tm_mon < 0 || t->tm_mon >= 12)
|
if (t->tm_mon < 0 || t->tm_mon >= 12)
|
||||||
return (time_t) -1;
|
return (time_t) -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user