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) {
103103 minute = matcher .group (6 );
104104 second = matcher .group (7 );
105105 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" );
107107 if (matcher .group (8 ) != null ) {
108108 // Normalize milliseconds to 3-length digit
109109 milliseconds = matcher .group (8 );
Original file line number Diff line number Diff line change 88 "data" : " 1963-06-19T08:30:06.283185Z" ,
99 "valid" : true
1010 },
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+ },
1126 {
1227 "description" : " an invalid date-time string" ,
1328 "data" : " 06/19/1963 08:30:06 PST" ,
5974 "valid" : false
6075 },
6176 {
62- "description" : " an invalid date-time string" ,
77+ "description" : " a valid date-time string" ,
6378 "data" : " 2019-02-28T13:30:06Z" ,
64- "valid" : false
79+ "valid" : true
6580 },
6681 {
6782 "description" : " an invalid date-time string" ,
You can’t perform that action at this time.
0 commit comments