Commit 0ea39aa4 authored by antirez's avatar antirez
Browse files

Localtime: fix daylight saving adjustment. Use * not +.

parent 6614d305
......@@ -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. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment