UnsupportedTemporalTypeException: Unsupported field: InstantSeconds
问题 I have this code which is producing a timestamp and then parsing. DateTimeFormatter formatter = DateTimeFormatter .ofPattern("yyyyMMdd kk:HH:ss.SSSZ") .withLocale(Locale.getDefault()) .withZone(ZoneId.systemDefault()); Instant now = Instant.now(); String formatted = formatter.format(now); Instant parsed = formatter.parse(formatted, Instant::from); When it runs, the last line produces an exception: java.time.format.DateTimeParseException: Text '20180123 12:12:45.648-0500' could not be parsed: