Merge pull request #1653 from tko/date-format

Fix garbled dates when using --date-format
This commit is contained in:
John Wiegley 2018-06-13 10:08:55 -07:00 committed by GitHub
commit ef0e1f543c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;