Skip to content

Commit 0a0cf14

Browse files
committed
Merge pull request #3691
a143d4c Fix crash in importwallet and dumpwallet formatting (Wladimir J. van der Laan)
2 parents b25d1c0 + a143d4c commit 0a0cf14

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rpcdump.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ using namespace std;
2323
void EnsureWalletIsUnlocked();
2424

2525
std::string static EncodeDumpTime(int64_t nTime) {
26-
return DateTimeStrFormat("%Y-%m-%"PRId64"T%H:%M:%SZ", nTime);
26+
return DateTimeStrFormat("%Y-%m-%dT%H:%M:%SZ", nTime);
2727
}
2828

2929
int64_t static DecodeDumpTime(const std::string &str) {
30-
static boost::posix_time::time_input_facet facet("%Y-%m-%dT%H:%M:%SZ");
3130
static const boost::posix_time::ptime epoch = boost::posix_time::from_time_t(0);
32-
const std::locale loc(std::locale::classic(), &facet);
31+
static const std::locale loc(std::locale::classic(),
32+
new boost::posix_time::time_input_facet("%Y-%m-%dT%H:%M:%SZ"));
3333
std::istringstream iss(str);
3434
iss.imbue(loc);
3535
boost::posix_time::ptime ptime(boost::date_time::not_a_date_time);

0 commit comments

Comments
 (0)