Skullabs / kikaha

A fast middleware designed for microservices
https://skullabs.github.io/kikaha/
Apache License 2.0
59 stars 13 forks source link

Date converters improvement #254

Closed roneigebert closed 5 years ago

roneigebert commented 6 years ago

Currently the LocalDateTimeConverter.java and ZonedDateTimeConverter.java converters use DateConverter.java, but for these I think it is interesting to use the ISO format, example:

String dateAsString = "2020-10-10T10:15:30+03:00";
ZonedDateTime convertedDate = ZonedDateTime.parse( dateAsString, DateTimeFormatter.ISO_ZONED_DATE_TIME );

String dateAsString = "2020-10-10T10:15:30";
LocalDateTime convertedDate = LocalDateTime.parse( dateAsString, DateTimeFormatter.ISO_LOCAL_DATE_TIME );