(increment): When calculating time interval increments, set tm_isdst

to zero to avoid gaining or losing a day because of daylight savings
time.
This commit is contained in:
John Wiegley 2006-02-16 20:17:52 +00:00
parent a787adb127
commit fec8fbf6be

View file

@ -90,9 +90,10 @@ std::time_t interval_t::increment(const std::time_t moment) const
}
}
desc->tm_hour = 0;
desc->tm_min = 0;
desc->tm_sec = 0;
desc->tm_hour = 0;
desc->tm_min = 0;
desc->tm_sec = 0;
desc->tm_isdst = 0;
then = std::mktime(desc);
}