File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -733,7 +733,7 @@ private long visitISODateTimeConstructor() {
733
733
throw new JsonParseException ("JSON reader expected a string but found '%s'." , valueToken .getValue ());
734
734
}
735
735
verifyToken (")" );
736
- String [] patterns = {"yyyy-MM-dd" , "yyyy-MM-dd'T'hh :mm:ssz" , "yyyy-MM-dd'T'hh :mm:ss.SSSz" };
736
+ String [] patterns = {"yyyy-MM-dd" , "yyyy-MM-dd'T'HH :mm:ssz" , "yyyy-MM-dd'T'HH :mm:ss.SSSz" };
737
737
738
738
SimpleDateFormat format = new SimpleDateFormat (patterns [0 ], Locale .ENGLISH );
739
739
ParsePosition pos = new ParsePosition (0 );
Original file line number Diff line number Diff line change @@ -118,6 +118,15 @@ public void testDateTimeShell() {
118
118
assertEquals (AbstractBsonReader .State .DONE , bsonReader .getState ());
119
119
}
120
120
121
+ @ Test
122
+ public void testDateTimeShellWith24HourTimeSpecification () {
123
+ String json = "ISODate(\" 2013-10-04T12:07:30.443Z\" )" ;
124
+ bsonReader = new JsonReader (json );
125
+ assertEquals (BsonType .DATE_TIME , bsonReader .readBsonType ());
126
+ assertEquals (1380888450443L , bsonReader .readDateTime ());
127
+ assertEquals (AbstractBsonReader .State .DONE , bsonReader .getState ());
128
+ }
129
+
121
130
@ Test
122
131
public void testDateTimeStrict () {
123
132
String json = "{ \" $date\" : 0 }" ;
You can’t perform that action at this time.
0 commit comments