diff options
author | Max Kellermann <max@musicpd.org> | 2019-08-19 22:35:47 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-12-16 23:24:43 +0100 |
commit | b06825829bbc71876dc8ba2c3d7acdc96e9f208e (patch) | |
tree | 25b1cf47dfc2a818ffc28a2ee234781b44326a7a /test | |
parent | ba4cd47fd8cb853f1b4e04c7dcb5221bb0c05150 (diff) |
time/ISO8601: allow omitting the "Z" suffix
And allow "Z" suffix after date.
Diffstat (limited to 'test')
-rw-r--r-- | test/TestISO8601.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/TestISO8601.cxx b/test/TestISO8601.cxx index d5e8dd2dc..6fdc11dc8 100644 --- a/test/TestISO8601.cxx +++ b/test/TestISO8601.cxx @@ -51,6 +51,12 @@ static constexpr struct { { "2019-02-04", 1549238400, std::chrono::hours(24) }, { "2018-12-31", 1546214400, std::chrono::hours(24) }, { "2019-01-01", 1546300800, std::chrono::hours(24) }, + + /* date with time zone */ + { "2019-02-04Z", 1549238400, std::chrono::hours(24) }, + + /* without time zone */ + { "2019-02-04T16:46:41", 1549298801, std::chrono::seconds(1) }, }; TEST(ISO8601, Parse) |