summaryrefslogtreecommitdiff
path: root/src/localtime.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-07-04 15:16:54 +0200
committerantirez <antirez@gmail.com>2018-07-04 15:16:54 +0200
commit296441445068762a138b31eb20433d2cd9d17d4b (patch)
tree21d569c899265fe144524076492458bf0abcc03f /src/localtime.c
parent0ea39aa404ea9243838dcd8cb5f246ec895136cf (diff)
downloadredis-296441445068762a138b31eb20433d2cd9d17d4b.tar.gz
Localtime: fix comment about leap year.
Diffstat (limited to 'src/localtime.c')
-rw-r--r--src/localtime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/localtime.c b/src/localtime.c
index 2021325b4..8c1ff4955 100644
--- a/src/localtime.c
+++ b/src/localtime.c
@@ -79,7 +79,7 @@ void nolocks_localtime(struct tm *tmp, time_t t, time_t tz, int dst) {
/* Calculate the current year. */
tmp->tm_year = 1970;
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);
if (days_this_year > days) break;
days -= days_this_year;