So I would expect this code to work under the new Java 8 date/time package since all it does is to convert a given ZonedDateTime to string and back using the same built-in D
I'm not sure, but this might be a bug in Java 8. Maybe it was intended to behave in this way, but I think that the workaround I'm going to propose to you should be the default behavior (when no ZoneId is specified, just take system default):
ZonedDateTime now = ZonedDateTime.now();
DateTimeFormatter formatter = DateTimeFormatter.ISO_INSTANT
.withZone(ZoneId.systemDefault());
System.out
.println(ZonedDateTime.parse(now.format(formatter), formatter));
There's a similar bug which was fixed in OpenJDK: JDK-8033662 - but it's only similar, not exactly the same.