diff options
author | John Wiegley <johnw@newartisans.com> | 2018-06-13 10:08:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-13 10:08:55 -0700 |
commit | ef0e1f543cb53c26638329b7591884d5e82f9fa1 (patch) | |
tree | ca6a22b00a072541695b856989d53f5970583335 /src/print.cc | |
parent | db42d7b25232c2cfd25de4f795bf3b0d2fb4479d (diff) | |
parent | 850a2cec794ef0d98dbaaf83e5ddce4ecb819e27 (diff) | |
download | fork-ledger-ef0e1f543cb53c26638329b7591884d5e82f9fa1.tar.gz fork-ledger-ef0e1f543cb53c26638329b7591884d5e82f9fa1.tar.bz2 fork-ledger-ef0e1f543cb53c26638329b7591884d5e82f9fa1.zip |
Merge pull request #1653 from tko/date-format
Fix garbled dates when using --date-format
Diffstat (limited to 'src/print.cc')
-rw-r--r-- | src/print.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/print.cc b/src/print.cc index 9fa75eab..92323777 100644 --- a/src/print.cc +++ b/src/print.cc @@ -103,11 +103,13 @@ namespace { void print_xact(report_t& report, std::ostream& out, xact_t& xact) { format_type_t format_type = FMT_WRITTEN; + string format_str; optional<const char *> format; if (report.HANDLED(date_format_)) { format_type = FMT_CUSTOM; - format = report.HANDLER(date_format_).str().c_str(); + format_str = report.HANDLER(date_format_).str(); + format = format_str.c_str(); } std::ostringstream buf; |