summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--project2/xml/xmlPresenter.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/project2/xml/xmlPresenter.cpp b/project2/xml/xmlPresenter.cpp
index 88b5108..ec3d637 100644
--- a/project2/xml/xmlPresenter.cpp
+++ b/project2/xml/xmlPresenter.cpp
@@ -198,10 +198,8 @@ class XmlNodeWriter : public boost::static_visitor<bool> {
}
if (!dateFormat.isNull()) {
std::stringstream ss;
- boost::date_time::time_facet<boost::posix_time::ptime, char> * ft = new boost::date_time::time_facet<boost::posix_time::ptime, char>();
- ss.imbue(std::locale(ss.getloc(), ft));
- ft->format(dateFormat);
- ss << boost::get<boost::posix_time::ptime>(i);
+ boost::posix_time::time_facet ft(dateFormat.as<const char *>());
+ ft.put(ss, ss, ' ', i);
node->set_attribute("custom", ss.str());
}
return true;