From d9102c755951dd4d92a97ef8665727ab38b067e3 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 16 Feb 2006 20:17:52 +0000 Subject: (increment): When calculating time interval increments, set tm_isdst to zero to avoid gaining or losing a day because of daylight savings time. --- datetime.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/datetime.cc b/datetime.cc index e26ddf98..f3434112 100644 --- a/datetime.cc +++ b/datetime.cc @@ -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); } -- cgit v1.2.3