Add an ability to set timezone in Rfc3339DateJsonAdapter
Ekalips opened this issue · 1 comments
Suggestion:
Add an ability to create Rfc3339DateJsonAdapter with a TimeZone other than UTC.
The issue:
Because of the current Rfc3339DateJsonAdapter behaviour, any API interaction that involves a client sending time to perform any logic will require client to manually format it's date with the according TimeZone. Also, it's not specifically mentioned in the documents to Rfc3339DateJsonAdapter that it will bring the provided time to the UTC time.
Example use case:
An app used by German (UTC+2) user wants to request events that are happening at this time and needs to send its current time to the server. If app will use the Rfc3339DateJsonAdapter to format date-time, server will get the UTC time (ie current user time - 2) without any hints that it's not the actual timezone (unless implemented somewhere else).
RFC 3339 explicitly uses UTC: https://datatracker.ietf.org/doc/html/rfc3339#section-4.1.