-
|
When attempting to deserialise record Test(OffsetDateTime time) {}
Test value = new ObjectMapper().readValue("{\"time\":\"2007-12-03T10:15:30+01:00\"}", Test.class);
System.out.println(value.time); // 2007-12-03T09:15:30ZHowever manually parsing the date produces the expected result: System.out.println(OffsetDateTime.parse("2007-12-03T10:15:30+01:00")); // 2007-12-03T10:15:30+01:00I can see some code related to this which is using |
Beta Was this translation helpful? Give feedback.
Answered by
pjfanning
Apr 25, 2026
Replies: 1 comment 1 reply
-
|
DateTimeFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE defaults to true. Maybe, if you disable this feature, the time zone from the input might be preserved. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jfrs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
DateTimeFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE defaults to true.
Maybe, if you disable this feature, the time zone from the input might be preserved.