From 858978de8931ce5c98882472b10051f4e57dd029 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 1 Aug 2008 17:37:22 -0400 Subject: Journal data structures now use date_t instead of datetime_t. This means transactions can only have day-level granularity -- which has always been the case from an data file point of view. The advantage to this restriction is that reports will now be immune from daylight savings related bugs, where a transaction falls to the wrong side of a --monthly report, for example. --- report.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'report.cc') diff --git a/report.cc b/report.cc index dd821c22..5b74806a 100644 --- a/report.cc +++ b/report.cc @@ -87,9 +87,9 @@ report_t::chain_xact_handlers(xact_handler_ptr base_handler, // xacts which can be reconciled to a given balance // (calculated against the xacts which it receives). if (! reconcile_balance.empty()) { - datetime_t cutoff = current_moment; + date_t cutoff = current_date; if (! reconcile_date.empty()) - cutoff = parse_datetime(reconcile_date); + cutoff = parse_date(reconcile_date); handler.reset(new reconcile_xacts (handler, value_t(reconcile_balance), cutoff)); } @@ -309,7 +309,7 @@ value_t report_t::ftime(call_scope_t& args) if (args.size() < 1) throw_(std::logic_error, "usage: ftime(DATE [, DATE_FORMAT])"); - datetime_t date = args[0].as_datetime(); + date_t date = args[0].as_date(); string date_format; if (args.size() == 2) -- cgit v1.2.3