diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-01-24 22:39:06 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-01-24 22:39:06 +0000 |
commit | 3487c46a5a5a4b42f3a8f6ed439402764f98142f (patch) | |
tree | c5af2a4ca93d54c284c8a0da01dd1a8344263b56 | |
parent | Partially tested global visibility hidden in all projects (diff) | |
download | project2-3487c46a5a5a4b42f3a8f6ed439402764f98142f.tar.bz2 project2-3487c46a5a5a4b42f3a8f6ed439402764f98142f.tar.xz project2-3487c46a5a5a4b42f3a8f6ed439402764f98142f.zip |
Fix random imbue not working bug with much less code
-rw-r--r-- | project2/xml/xmlPresenter.cpp | 6 |
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; |