Skip to content

Fix #98 timezone lost for @JsonFormat #167

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

Merged
merged 5 commits into from
May 6, 2025
Merged

Conversation

JooHyukKim
Copy link
Member

@JooHyukKim JooHyukKim commented May 4, 2025

Fixes #98

Comment on lines +20 to +48
static class Wrapper3Z<T> {
@JsonFormat(
shape = JsonFormat.Shape.STRING,
pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS ZZZ",
timezone = "Europe/Budapest" // +01:00 in winter
)
public T value;
Wrapper3Z(T v) { value = v; }
}

static class Wrapper2Z<T> {
@JsonFormat(
shape = JsonFormat.Shape.STRING,
pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS ZZ",
timezone = "Europe/Budapest"
)
public T value;
Wrapper2Z(T v) { value = v; }
}

static class Wrapper1Z<T> {
@JsonFormat(
shape = JsonFormat.Shape.STRING,
pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS Z",
timezone = "Europe/Budapest" // +01:00 in winter
)
public T value;
Wrapper1Z(T v) { value = v; }
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting difference reference from joda doc

@cowtowncoder
Copy link
Member

I assume this was meant to target 2.19, not 2.x (2.20)? If so, will merge but then backport, add release notes for 2.19.1.

@cowtowncoder cowtowncoder merged commit b8c9e12 into FasterXML:2.x May 6, 2025
9 checks passed
cowtowncoder pushed a commit that referenced this pull request May 6, 2025
@JooHyukKim JooHyukKim deleted the fix-98 branch May 6, 2025 04:15
@JooHyukKim
Copy link
Member Author

I assume this was meant to target 2.19, not 2.x (2.20)? If so, will merge but then backport, add release notes for 2.19.1.

My intial thought was 2.20, but 2.19 seems also reasonable 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JsonFormat timezone attribute effect overwritten if pattern attribute present
2 participants