mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Bug 924, my_timegm: Added a comment about 2100 not being a leap year.
This commit is contained in:
parent
01fdf6c4d3
commit
18771fdedb
@ -218,6 +218,8 @@ my_timegm(struct tm *tm)
|
|||||||
tm->tm_mon *= 153; tm->tm_mon += 2;
|
tm->tm_mon *= 153; tm->tm_mon += 2;
|
||||||
tm->tm_year -= 68;
|
tm->tm_year -= 68;
|
||||||
|
|
||||||
|
/* Bug 924: Assumes all years divisible by 4 are leap years,
|
||||||
|
* even though e.g. 2100 is not. */
|
||||||
tm->tm_mday += tm->tm_year * 1461 / 4;
|
tm->tm_mday += tm->tm_year * 1461 / 4;
|
||||||
tm->tm_mday += ((tm->tm_mon / 5) - 672);
|
tm->tm_mday += ((tm->tm_mon / 5) - 672);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user