Skip to content

Commit 78048ea

Browse files
format: add RFC 3339 unknown local offset (-00:00) test for time (#878)
Signed-off-by: Vaibhav mittal <vaibhavmittal929@gmail.com>
1 parent ee3fc3d commit 78048ea

4 files changed

Lines changed: 24 additions & 0 deletions

File tree

tests/draft2019-09/optional/format/time.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,12 @@
146146
"data": "08:30:06-08:00",
147147
"valid": true
148148
},
149+
{
150+
"description": "time with unknown local offset is valid",
151+
"comment": "RFC 3339 section 4.3 (unknown local offset)",
152+
"data": "12:34:56-00:00",
153+
"valid": true
154+
},
149155
{
150156
"description": "hour, minute in time-offset must be two digits",
151157
"data": "08:30:06-8:000",

tests/draft2020-12/optional/format/time.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,12 @@
146146
"data": "08:30:06-08:00",
147147
"valid": true
148148
},
149+
{
150+
"description": "time with unknown local offset is valid",
151+
"comment": "RFC 3339 section 4.3 (unknown local offset)",
152+
"data": "12:34:56-00:00",
153+
"valid": true
154+
},
149155
{
150156
"description": "hour, minute in time-offset must be two digits",
151157
"data": "08:30:06-8:000",

tests/draft7/optional/format/time.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@
143143
"data": "08:30:06-08:00",
144144
"valid": true
145145
},
146+
{
147+
"description": "time with unknown local offset is valid",
148+
"comment": "RFC 3339 section 4.3 (unknown local offset)",
149+
"data": "12:34:56-00:00",
150+
"valid": true
151+
},
146152
{
147153
"description": "hour, minute in time-offset must be two digits",
148154
"data": "08:30:06-8:000",

tests/v1/format/time.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,12 @@
146146
"data": "08:30:06-08:00",
147147
"valid": true
148148
},
149+
{
150+
"description": "time with unknown local offset is valid",
151+
"comment": "RFC 3339 section 4.3 (unknown local offset)",
152+
"data": "12:34:56-00:00",
153+
"valid": true
154+
},
149155
{
150156
"description": "hour, minute in time-offset must be two digits",
151157
"data": "08:30:06-8:000",

0 commit comments

Comments
 (0)