Closed
Description
Search before asking
- I searched in the issues and found nothing similar.
Describe the bug
Hi, I'm using JavaTimeModule() in my app with SerializationFeature.WRITE_DATES_WITH_ZONE_ID enabled and there's a strange thing:
When JsonFormat-annotation with pattern is added:
static class SomeDto {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z")
private ZonedDateTime time;
}
Current object is always serialized as an ISO_ZONED_DATE_TIME, e.g. "2024-11-15T18:27:06.921054+01:00[Europe/Germany]", the pattern is not taken into account.
Could you give a hint if this is expected behaviour, thank you!
Version Information
2.18.1
Expected behavior
{"time":"2024-12-02 16:30:00 CET"}
Metadata
Metadata
Assignees
Labels
No labels