From c645ac1de7b7b492eb9096e1a16937c9d3539795 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 22 May 2010 22:04:26 -0400 Subject: If FMT_CUSTOM is given, and no format, use FMT_PRINTED --- src/times.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/times.cc') diff --git a/src/times.cc b/src/times.cc index 00be1d3b..35082f51 100644 --- a/src/times.cc +++ b/src/times.cc @@ -1471,7 +1471,7 @@ std::string format_datetime(const datetime_t& when, if (format_type == FMT_WRITTEN) { return written_datetime_io->format(when); } - else if (format_type == FMT_CUSTOM || format) { + else if (format_type == FMT_CUSTOM && format) { datetime_io_map::iterator i = temp_datetime_io.find(*format); if (i != temp_datetime_io.end()) { return (*i).second->format(when); @@ -1497,7 +1497,7 @@ std::string format_date(const date_t& when, if (format_type == FMT_WRITTEN) { return written_date_io->format(when); } - else if (format_type == FMT_CUSTOM || format) { + else if (format_type == FMT_CUSTOM && format) { date_io_map::iterator i = temp_date_io.find(*format); if (i != temp_date_io.end()) { return (*i).second->format(when); -- cgit v1.2.3