File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
main/java/com/networknt/schema
test/resources/tests/optional Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ private boolean isLegalDateTime(String string) {
103
103
minute = matcher .group (6 );
104
104
second = matcher .group (7 );
105
105
dateTime .append ('T' ).append (hour ).append (':' ).append (minute ).append (':' ).append (second );
106
- pattern .append ("'T'hh :mm:ss" );
106
+ pattern .append ("'T'HH :mm:ss" );
107
107
if (matcher .group (8 ) != null ) {
108
108
// Normalize milliseconds to 3-length digit
109
109
milliseconds = matcher .group (8 );
Original file line number Diff line number Diff line change 8
8
"data" : " 1963-06-19T08:30:06.283185Z" ,
9
9
"valid" : true
10
10
},
11
+ {
12
+ "description" : " a valid date-time string" ,
13
+ "data" : " 2019-07-24T00:00:01-04:00" ,
14
+ "valid" : true
15
+ },
16
+ {
17
+ "description" : " an invalid date-time string" ,
18
+ "data" : " 2019-07-24T24:00:01-04:00" ,
19
+ "valid" : false
20
+ },
21
+ {
22
+ "description" : " an invalid date-time string" ,
23
+ "data" : " 2019-07-24T25/:00:01-04:00" ,
24
+ "valid" : false
25
+ },
11
26
{
12
27
"description" : " an invalid date-time string" ,
13
28
"data" : " 06/19/1963 08:30:06 PST" ,
59
74
"valid" : false
60
75
},
61
76
{
62
- "description" : " an invalid date-time string" ,
77
+ "description" : " a valid date-time string" ,
63
78
"data" : " 2019-02-28T13:30:06Z" ,
64
- "valid" : false
79
+ "valid" : true
65
80
},
66
81
{
67
82
"description" : " an invalid date-time string" ,
You can’t perform that action at this time.
0 commit comments