1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-29 03:17:53 -04:00

Bug 924, my_timegm: Added a comment about 2100 not being a leap year.

This commit is contained in:
Kalle Olavi Niemitalo 2007-01-13 15:38:02 +02:00 committed by Kalle Olavi Niemitalo
parent 01fdf6c4d3
commit 18771fdedb

View File

@ -218,6 +218,8 @@ my_timegm(struct tm *tm)
tm->tm_mon *= 153; tm->tm_mon += 2;
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_mon / 5) - 672);