(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:
parent
7a44b2e367
commit
d9102c7559
1 changed files with 4 additions and 3 deletions
|
|
@ -93,6 +93,7 @@ std::time_t interval_t::increment(const std::time_t moment) const
|
||||||
desc->tm_hour = 0;
|
desc->tm_hour = 0;
|
||||||
desc->tm_min = 0;
|
desc->tm_min = 0;
|
||||||
desc->tm_sec = 0;
|
desc->tm_sec = 0;
|
||||||
|
desc->tm_isdst = 0;
|
||||||
|
|
||||||
then = std::mktime(desc);
|
then = std::mktime(desc);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue