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() {
733733 throw new JsonParseException ("JSON reader expected a string but found '%s'." , valueToken .getValue ());
734734 }
735735 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" };
737737
738738 SimpleDateFormat format = new SimpleDateFormat (patterns [0 ], Locale .ENGLISH );
739739 ParsePosition pos = new ParsePosition (0 );
Original file line number Diff line number Diff line change @@ -118,6 +118,15 @@ public void testDateTimeShell() {
118118 assertEquals (AbstractBsonReader .State .DONE , bsonReader .getState ());
119119 }
120120
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+
121130 @ Test
122131 public void testDateTimeStrict () {
123132 String json = "{ \" $date\" : 0 }" ;
You can’t perform that action at this time.
0 commit comments