diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-02-17 18:44:06 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-02-17 18:45:10 +0100 |
| commit | 0a0cf1433769e495839c5695f388b277b9ff2dfa (patch) | |
| tree | c6eee487279af4e7eeaf14ed6a1c89a7d124cf78 /src/rpcdump.cpp | |
| parent | Merge pull request #3679 from laanwj/2014_02_walletpassphrase_behavior (diff) | |
| parent | Fix crash in importwallet and dumpwallet formatting (diff) | |
| download | discoin-0a0cf1433769e495839c5695f388b277b9ff2dfa.tar.xz discoin-0a0cf1433769e495839c5695f388b277b9ff2dfa.zip | |
Merge pull request #3691
a143d4c Fix crash in importwallet and dumpwallet formatting (Wladimir J. van der Laan)
Diffstat (limited to 'src/rpcdump.cpp')
| -rw-r--r-- | src/rpcdump.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp index a912ea767..9e1d47846 100644 --- a/src/rpcdump.cpp +++ b/src/rpcdump.cpp @@ -23,13 +23,13 @@ using namespace std; void EnsureWalletIsUnlocked(); std::string static EncodeDumpTime(int64_t nTime) { - return DateTimeStrFormat("%Y-%m-%"PRId64"T%H:%M:%SZ", nTime); + return DateTimeStrFormat("%Y-%m-%dT%H:%M:%SZ", nTime); } int64_t static DecodeDumpTime(const std::string &str) { - static boost::posix_time::time_input_facet facet("%Y-%m-%dT%H:%M:%SZ"); static const boost::posix_time::ptime epoch = boost::posix_time::from_time_t(0); - const std::locale loc(std::locale::classic(), &facet); + static const std::locale loc(std::locale::classic(), + new boost::posix_time::time_input_facet("%Y-%m-%dT%H:%M:%SZ")); std::istringstream iss(str); iss.imbue(loc); boost::posix_time::ptime ptime(boost::date_time::not_a_date_time); |