summaryrefslogtreecommitdiff
path: root/src/times.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-02-28 21:19:36 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-02-28 21:19:36 -0600
commit5517871144e61ec1c7bad8f4dd96e0672e63f9d1 (patch)
tree655dc095728b7a0369b1c34c08c5364c04baaea2 /src/times.cc
parent9376b0f7b6a930baa063f0681157c93ba68ed47a (diff)
downloadfork-ledger-5517871144e61ec1c7bad8f4dd96e0672e63f9d1.tar.gz
fork-ledger-5517871144e61ec1c7bad8f4dd96e0672e63f9d1.tar.bz2
fork-ledger-5517871144e61ec1c7bad8f4dd96e0672e63f9d1.zip
Corrected problem with parsing of leap days
Diffstat (limited to 'src/times.cc')
-rw-r--r--src/times.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/times.cc b/src/times.cc
index 9712c2ee..8ea90892 100644
--- a/src/times.cc
+++ b/src/times.cc
@@ -173,6 +173,7 @@ namespace {
#else // USE_BOOST_FACETS
std::tm data;
std::memset(&data, 0, sizeof(std::tm));
+ data.tm_year = CURRENT_DATE().year() - 1900;
data.tm_mday = 1; // some formats have no day
if (strptime(str, fmt_str, &data))
return gregorian::date_from_tm(data);