diff options
author | louiz’ <louiz@louiz.org> | 2016-10-03 23:30:20 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2016-10-03 17:58:16 +0200 |
commit | e5b392ece8c90605b86d0d93f0ca6989048bc1c3 (patch) | |
tree | d3fc1e3509680b60cba3526492adcaaf56417f02 /tests | |
parent | fca25b7704014f7a7dec6185afe8e27b591776e4 (diff) | |
download | biboumi-e5b392ece8c90605b86d0d93f0ca6989048bc1c3.tar.gz biboumi-e5b392ece8c90605b86d0d93f0ca6989048bc1c3.tar.bz2 biboumi-e5b392ece8c90605b86d0d93f0ca6989048bc1c3.tar.xz biboumi-e5b392ece8c90605b86d0d93f0ca6989048bc1c3.zip |
Fix parse_datetime by always using a 'z' as the timezone
Because some plateform accept Z and z, but some only accept z…
Diffstat (limited to 'tests')
-rw-r--r-- | tests/utils.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/utils.cpp b/tests/utils.cpp index 5913f8d..a18fc81 100644 --- a/tests/utils.cpp +++ b/tests/utils.cpp @@ -124,10 +124,7 @@ TEST_CASE("time_to_string") TEST_CASE("parse_datetime") { - const auto time = utils::parse_datetime("1970-01-01T00:00:00Z"); - CHECK(time == 0); - CHECK(utils::parse_datetime("2016-08-29T14:29:28Z") == 1472480968); - CHECK(utils::parse_datetime("2016-08-29T14:29:28UT") == 1472480968); - CHECK(utils::parse_datetime("2016-08-29T14:29:28GMT") == 1472480968); + CHECK(utils::parse_datetime("1970-01-01T00:00:00z") == 0); + CHECK(utils::parse_datetime("2016-08-29T14:29:29Z") == 1472480969); CHECK(utils::parse_datetime("blah") == -1); }
\ No newline at end of file |