diff options
-rw-r--r-- | src/times.cc | 1 | ||||
-rw-r--r-- | test/regress/65FECA4D.test | 12 |
2 files changed, 13 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); diff --git a/test/regress/65FECA4D.test b/test/regress/65FECA4D.test new file mode 100644 index 00000000..3e575961 --- /dev/null +++ b/test/regress/65FECA4D.test @@ -0,0 +1,12 @@ +--now=2012-02-28 + +Y 2012 + +2/29 E-trade Bank + Expenses:Food $20 + Assets:Cash + +test reg +12-Feb-29 E-trade Bank Expenses:Food $20 $20 + Assets:Cash $-20 0 +end test |