Greg
Greg
Thanks @mihakrajnc I'll take a look. I still need to update the READMEs with some Kotlin examples, and do the release ...
@nbali would you like to contribute a PR?
To cope with an offset, you'll need to use an [`OffsetDateTime`](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) and the [`OffsetDateTimeConverter`](https://github.com/gkopff/gson-javatime-serialisers/blob/master/src/main/java/com/fatboyindustrial/gsonjavatime/OffsetDateTimeConverter.java). You are right that the `InstantConverter` cannot cope with an offset.
Pull requests welcome. :-)
I will take a look and see what I can find.
@patricklucas Take a look at 8e5b022 - it adds your test class and this test case: ```` final Instant instant = Instant.parse("2017-06-08T22:11:28.566Z"); final Issue20 issue = new Issue20(instant); final String...
Perhaps in your real code you're accidentally using a `Gson` instance that hasn't had the converters registered.
Presently all the converters are only designed to "round-trip" their data. In the case of the `Instant`, the JSON form is `2016-09-11T22:41:51.335Z` - the expected format it isn't the epoch...
@CyborTronik do you know if this example works okay using GSON 2.3.1?
Do you mean that PHP doesn't output a timestamp in ISO 8601 format? Right now, you can't customise the input/output format - it is useful to round-trip the data between...