diff options
| author | Wladimir J. van der Laan <[email protected]> | 2018-04-14 18:32:43 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2018-04-14 18:32:55 +0200 |
| commit | dec61152d6cc711d627d5dee497156d4a19c2499 (patch) | |
| tree | 2c90dddf1bea5f4de63490b1f6c8b55603725dd8 /src/test | |
| parent | Merge #11200: Allow for aborting rescans in the GUI (diff) | |
| parent | Avoid std::locale/imbue in DateTimeStrFormat (diff) | |
| download | discoin-dec61152d6cc711d627d5dee497156d4a19c2499.tar.xz discoin-dec61152d6cc711d627d5dee497156d4a19c2499.zip | |
Merge #12973: Avoid std::locale/imbue madness in DateTimeStrFormat
1527015 Avoid std::locale/imbue in DateTimeStrFormat (Pieter Wuille)
Pull request description:
And replace them with just hardcoded ISO8601 strings and `gmtime_r`.
Pointed out by @laanwj here: https://github.com/bitcoin/bitcoin/pull/12970#issuecomment-380962488
Tree-SHA512: a459758b42ca56f8462115aefe8e6377c1319fce509ea64dbb767f3f087c9b848335954cb684e5896c38008847684045505a3e1559fb3e83b8e80e10b003d1e7
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/util_tests.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index d41c43a79..e8c7b80c3 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -159,17 +159,6 @@ BOOST_AUTO_TEST_CASE(util_HexStr) } -BOOST_AUTO_TEST_CASE(util_DateTimeStrFormat) -{ - BOOST_CHECK_EQUAL(DateTimeStrFormat("%Y-%m-%d %H:%M:%S", 0), "1970-01-01 00:00:00"); - BOOST_CHECK_EQUAL(DateTimeStrFormat("%Y-%m-%d %H:%M:%S", 0x7FFFFFFF), "2038-01-19 03:14:07"); - BOOST_CHECK_EQUAL(DateTimeStrFormat("%Y-%m-%d %H:%M:%S", 1317425777), "2011-09-30 23:36:17"); - BOOST_CHECK_EQUAL(DateTimeStrFormat("%Y-%m-%dT%H:%M:%SZ", 1317425777), "2011-09-30T23:36:17Z"); - BOOST_CHECK_EQUAL(DateTimeStrFormat("%H:%M:%SZ", 1317425777), "23:36:17Z"); - BOOST_CHECK_EQUAL(DateTimeStrFormat("%Y-%m-%d %H:%M", 1317425777), "2011-09-30 23:36"); - BOOST_CHECK_EQUAL(DateTimeStrFormat("%a, %d %b %Y %H:%M:%S +0000", 1317425777), "Fri, 30 Sep 2011 23:36:17 +0000"); -} - BOOST_AUTO_TEST_CASE(util_FormatISO8601DateTime) { BOOST_CHECK_EQUAL(FormatISO8601DateTime(1317425777), "2011-09-30T23:36:17Z"); |