diff options
author | John Wiegley <johnw@newartisans.com> | 2006-02-16 20:17:52 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:41:23 -0400 |
commit | d9102c755951dd4d92a97ef8665727ab38b067e3 (patch) | |
tree | a96e24c6604a549222ee202554b68761e8aa97ea /datetime.cc | |
parent | 7a44b2e367e4c6036ec79925f027a124dbd73ceb (diff) | |
download | fork-ledger-d9102c755951dd4d92a97ef8665727ab38b067e3.tar.gz fork-ledger-d9102c755951dd4d92a97ef8665727ab38b067e3.tar.bz2 fork-ledger-d9102c755951dd4d92a97ef8665727ab38b067e3.zip |
(increment): When calculating time interval increments, set tm_isdst
to zero to avoid gaining or losing a day because of daylight savings
time.
Diffstat (limited to 'datetime.cc')
-rw-r--r-- | datetime.cc | 7 |
1 files 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); } |