File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
api/src/main/java/io/minio/messages Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change 1919import com .fasterxml .jackson .annotation .JsonCreator ;
2020import io .minio .Time ;
2121import java .time .ZonedDateTime ;
22- import java .time .format .DateTimeFormatter ;
23- import java .time .format .DateTimeParseException ;
24- import java .util .Locale ;
2522import org .simpleframework .xml .Root ;
2623import org .simpleframework .xml .convert .Convert ;
2724import org .simpleframework .xml .convert .Converter ;
3229@ Root
3330@ Convert (ResponseDate .ResponseDateConverter .class )
3431public class ResponseDate {
35- public static final DateTimeFormatter MINIO_RESPONSE_DATE_FORMAT =
36- DateTimeFormatter .ofPattern ("yyyy-MM-dd'T'HH':'mm':'ss'Z'" , Locale .US ).withZone (Time .UTC );
37-
3832 private ZonedDateTime zonedDateTime ;
3933
4034 public ResponseDate () {}
@@ -53,11 +47,7 @@ public String toString() {
5347
5448 @ JsonCreator
5549 public static ResponseDate fromString (String responseDateString ) {
56- try {
57- return new ResponseDate (ZonedDateTime .parse (responseDateString , Time .RESPONSE_DATE_FORMAT ));
58- } catch (DateTimeParseException e ) {
59- return new ResponseDate (ZonedDateTime .parse (responseDateString , MINIO_RESPONSE_DATE_FORMAT ));
60- }
50+ return new ResponseDate (ZonedDateTime .parse (responseDateString ));
6151 }
6252
6353 /** XML converter class. */
You can’t perform that action at this time.
0 commit comments