gson-javatime-serialisers icon indicating copy to clipboard operation
gson-javatime-serialisers copied to clipboard

Does InstantConverter support UTC offset values?

Open coferc opened this issue 7 years ago • 2 comments

Can I deserialize a value using InstantConverter that includes a UTC offset like, "2017-04-22T00:00:00-04:00", or does the string have to be in UTC? I think the answer is that it doesn't support UTC offset, because I tried and it didn't work, but that could be user error. Thanks!

coferc avatar Sep 29 '17 21:09 coferc

To cope with an offset, you'll need to use an OffsetDateTime and the OffsetDateTimeConverter.

You are right that the InstantConverter cannot cope with an offset.

gkopff avatar Oct 01 '17 00:10 gkopff

Pull requests welcome. :-)

gkopff avatar Oct 01 '17 00:10 gkopff