diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-02-12 12:48:14 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-02-12 12:48:14 (GMT) |
commit | d073e9d261bb7134723e77f142603a555f8f9629 (patch) | |
tree | 3949c6749b3fec30a3ae4f7dd70d35aa56f99992 /Swiften/Parser/PayloadParsers/DelayParserFactory.cpp | |
parent | 5de579953a2e87afd7f4c56962c68f18ab3888aa (diff) | |
download | swift-contrib-d073e9d261bb7134723e77f142603a555f8f9629.zip swift-contrib-d073e9d261bb7134723e77f142603a555f8f9629.tar.bz2 |
Share locale object between delay parsers.
Diffstat (limited to 'Swiften/Parser/PayloadParsers/DelayParserFactory.cpp')
-rw-r--r-- | Swiften/Parser/PayloadParsers/DelayParserFactory.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Swiften/Parser/PayloadParsers/DelayParserFactory.cpp b/Swiften/Parser/PayloadParsers/DelayParserFactory.cpp new file mode 100644 index 0000000..19d0530 --- /dev/null +++ b/Swiften/Parser/PayloadParsers/DelayParserFactory.cpp @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2010 Kevin Smith + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#include <Swiften/Parser/PayloadParsers/DelayParserFactory.h> + +#include <boost/date_time/time_facet.hpp> + +namespace Swift { + +DelayParserFactory::DelayParserFactory() { + boost::posix_time::time_input_facet* facet = new boost::posix_time::time_input_facet("%Y-%m-%d %H:%M:%S%F%Q"); + locale = std::locale(std::locale::classic(), facet); +} + +} |