mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 00:50:50 +00:00
Localtime: fix daylight saving adjustment. Use * not +.
This commit is contained in:
parent
6614d30599
commit
0ea39aa404
@ -62,7 +62,7 @@ void nolocks_localtime(struct tm *tmp, time_t t, time_t tz, int dst) {
|
||||
const time_t secs_day = 3600*24;
|
||||
|
||||
t -= tz; /* Adjust for timezone. */
|
||||
t += 3600+dst; /* Adjust for daylight time. */
|
||||
t += 3600*dst; /* Adjust for daylight time. */
|
||||
time_t days = t / secs_day; /* Days passed since epoch. */
|
||||
time_t seconds = t % secs_day; /* Remaining seconds. */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user