twilio / twilio-java

A Java library for communicating with the Twilio REST API and generating TwiML.
MIT License
492 stars 429 forks source link

ReadReader throws exception when setDateCreatedAfter() or setDateCreatedOnOrBefore() is used #593

Closed noledgy closed 4 years ago

noledgy commented 4 years ago

Fixes #592

ReadReader was converting ZonedDateTime parameters setDateCreatedAfter() and setDateCreatedOnOrBefore() to a string using .toString(). This method should be only used for display purposes and makes getting a fax list fail. The format required by the REST interface is full ISO mode in UTC time (2020-10-05T06:29:31Z).

Added a method "private static String toZulu(ZonedDateTime date)" that converts the ZonedDateTime into an java.time.Instant and returns the proper string ISO format required by the Twilio Fax REST interface.

Checklist