gson-javatime-serialisers
gson-javatime-serialisers copied to clipboard
Does InstantConverter support UTC offset values?
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!
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.
Pull requests welcome. :-)