33 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
44 *
55 * OpenAPI spec version: v1.6.9
6- *
6+ *
77 *
88 * NOTE: This class is auto generated by the swagger code generator program.
99 * https://github.com/swagger-api/swagger-codegen.git
1616import com .google .gson .GsonBuilder ;
1717import com .google .gson .JsonParseException ;
1818import com .google .gson .TypeAdapter ;
19- import com .google .gson .internal .bind .util .ISO8601Utils ;
2019import com .google .gson .stream .JsonReader ;
2120import com .google .gson .stream .JsonWriter ;
2221
3332import java .lang .reflect .Type ;
3433import java .text .DateFormat ;
3534import java .text .ParseException ;
36- import java .text .ParsePosition ;
3735import java .util .Date ;
3836
3937public class JSON {
@@ -290,7 +288,7 @@ public java.sql.Date read(JsonReader in) throws IOException {
290288 if (dateFormat != null ) {
291289 return new java .sql .Date (dateFormat .parse (date ).getTime ());
292290 }
293- return new java .sql .Date (ISO8601Utils . parse ( date , new ParsePosition ( 0 )). getTime ( ));
291+ return new java .sql .Date (ISODateTimeFormat . basicDateTime (). parseMillis ( date ));
294292 } catch (ParseException e ) {
295293 throw new JsonParseException (e );
296294 }
@@ -326,7 +324,7 @@ public void write(JsonWriter out, Date date) throws IOException {
326324 if (dateFormat != null ) {
327325 value = dateFormat .format (date );
328326 } else {
329- value = ISO8601Utils . format ( date , true );
327+ value = ISODateTimeFormat . basicDateTime (). print ( date . getTime () );
330328 }
331329 out .value (value );
332330 }
@@ -345,7 +343,7 @@ public Date read(JsonReader in) throws IOException {
345343 if (dateFormat != null ) {
346344 return dateFormat .parse (date );
347345 }
348- return ISO8601Utils . parse ( date , new ParsePosition ( 0 ) );
346+ return ISODateTimeFormat . basicDateTime (). parseDateTime ( date ). toDate ( );
349347 } catch (ParseException e ) {
350348 throw new JsonParseException (e );
351349 }
0 commit comments