diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-17 01:50:38 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-08-17 01:50:38 -0400 |
commit | cd7d7e5b88d0cdca6b183c3b34cea2008136e0ec (patch) | |
tree | ec38b784d8cf2bae405d657601e22f96188c4cfe /datetime.cc | |
parent | 3a445455409af9475411d2d12220ae128033cb22 (diff) | |
download | fork-ledger-cd7d7e5b88d0cdca6b183c3b34cea2008136e0ec.tar.gz fork-ledger-cd7d7e5b88d0cdca6b183c3b34cea2008136e0ec.tar.bz2 fork-ledger-cd7d7e5b88d0cdca6b183c3b34cea2008136e0ec.zip |
slight fixes
Diffstat (limited to 'datetime.cc')
-rw-r--r-- | datetime.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/datetime.cc b/datetime.cc index a2badd39..586722b5 100644 --- a/datetime.cc +++ b/datetime.cc @@ -169,14 +169,10 @@ bool quick_parse_date(char * date_str, std::time_t * result) if (base == -1 || year != base_year) { struct std::tm when; - - when.tm_hour = 0; - when.tm_min = 0; - when.tm_sec = 0; + std::memset(&when, 0, sizeof(when)); base_year = year == -1 ? now_tm->tm_year + 1900 : year; when.tm_year = year == -1 ? now_tm->tm_year : year - 1900; - when.tm_mon = 0; when.tm_mday = 1; base = std::mktime(&when); |