-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
specifying only timezone in @JsonFormat doesn't serialize ZonedDateTime in specified timezone. #180
Labels
json-format
Missing handling of `@JsonFormat` property annotation
Comments
Needs to go to Java8 modules repo where support for Java 8 date/time is added, will transfer. |
Thank you for reporting this; sounds like incomplete handling of |
Looks like the same as #175, which was originally for |
@kupci Thanks, that makes sense. |
cowtowncoder
added
the
good first issue
Issue that seems easy to resolve and is likely a good candidate for contributors new to project
label
Sep 19, 2020
cowtowncoder
added
hacktoberfest
Issue related to Hactoberfest2020 activities, eligible for additional rewards
json-format
Missing handling of `@JsonFormat` property annotation
labels
Sep 30, 2020
cowtowncoder
removed
good first issue
Issue that seems easy to resolve and is likely a good candidate for contributors new to project
hacktoberfest
Issue related to Hactoberfest2020 activities, eligible for additional rewards
labels
Oct 16, 2020
I think this is effectively duplicate of #175, closing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For a ZonedDateTime field with timezone(Say ET), annotating this field with
@JsonFormat(timezone="UTC")
doesn't serialize it in the specified format. If I include the pattern in JsonFormat along with timezone it serializes correctly.While just specifying timezone while using old Date (from java.util.Date), it serializes in specified timezone. (without specifying pattern)
Jackson versions -
jackson-datatype-jsr : 2.11.0
Jackson Core : 2.11.0
Jackson databind: 2.11.0
Reproducer:
Output:
As you can see in output, for oldDate only specifying timezone serializes in UTC, but not for ZonedDateTime.
The text was updated successfully, but these errors were encountered: