mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
Localtime: fix comment about leap year.
This commit is contained in:
parent
0ea39aa404
commit
2964414450
@ -79,7 +79,7 @@ void nolocks_localtime(struct tm *tmp, time_t t, time_t tz, int dst) {
|
|||||||
/* Calculate the current year. */
|
/* Calculate the current year. */
|
||||||
tmp->tm_year = 1970;
|
tmp->tm_year = 1970;
|
||||||
while(1) {
|
while(1) {
|
||||||
/* Leap years have one year more. */
|
/* Leap years have one day more. */
|
||||||
time_t days_this_year = 365 + is_leap_year(tmp->tm_year);
|
time_t days_this_year = 365 + is_leap_year(tmp->tm_year);
|
||||||
if (days_this_year > days) break;
|
if (days_this_year > days) break;
|
||||||
days -= days_this_year;
|
days -= days_this_year;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user