Add time zone parsing support for only specifying HH

This commit is contained in:
Dimitri Schoolwerth
2017-06-20 18:41:39 +04:00
committed by Dimitri Schoolwerth
parent 101433190f
commit 1a5163a882
2 changed files with 17 additions and 3 deletions

View File

@@ -906,6 +906,11 @@ void DateTimeTestCase::TestTimeZoneParse()
// Z as UTC designator.
{ "13:37Z", true },
// Only containing HH offset.
{ "09:37-04", true },
{ "13:37+00", true },
{ "17:37+04", true },
// Colon as HH and MM separator.
{ "17:37+04:00", true },
@@ -918,6 +923,8 @@ void DateTimeTestCase::TestTimeZoneParse()
{ "00:00-1300" }, // Offset out of range.
{ "00:00+1300" }, // Offset out of range.
{ "00:00+00:" }, // Minutes missing after colon separator.
// Not exactly 2 digits for hours and minutes.
{ "17:37+4" },
{ "17:37+400" },