diff --git a/xml.cc b/xml.cc index 6e3007b8..b02954c6 100644 --- a/xml.cc +++ b/xml.cc @@ -336,16 +336,14 @@ void output_xml_string(std::ostream& out, const std::string& str) void format_xml_entries::format_last_entry() { - char buf[256]; - std::strftime(buf, 255, format_t::date_format.c_str(), - std::localtime(&last_entry->_date)); + char buf[32]; + std::strftime(buf, 31, "%Y/%m/%d", std::localtime(&last_entry->_date)); output_stream << " \n" << " " << buf << "\n"; if (last_entry->_date_eff) { - std::strftime(buf, 255, format_t::date_format.c_str(), - std::localtime(&last_entry->_date_eff)); + std::strftime(buf, 31, "%Y/%m/%d", std::localtime(&last_entry->_date_eff)); output_stream << " " << buf << "\n"; } @@ -375,13 +373,11 @@ void format_xml_entries::format_last_entry() output_stream << " \n"; if ((*i)->_date) { - std::strftime(buf, 255, format_t::date_format.c_str(), - std::localtime(&(*i)->_date)); + std::strftime(buf, 31, "%Y/%m/%d", std::localtime(&(*i)->_date)); output_stream << " " << buf << "\n"; } if ((*i)->_date_eff) { - std::strftime(buf, 255, format_t::date_format.c_str(), - std::localtime(&(*i)->_date_eff)); + std::strftime(buf, 31, "%Y/%m/%d", std::localtime(&(*i)->_date_eff)); output_stream << " " << buf << "\n"; }