Skip to content

JsonFormat timezone attribute effect overwritten if pattern attribute present #98

Open
@gviczai

Description

@gviczai

In JacksonJodaDateFormat:

public JacksonJodaDateFormat with(JsonFormat.Value ann) {
        JacksonJodaDateFormat format = this;
        format = format.withLocale(ann.getLocale());
        format = format.withTimeZone(ann.getTimeZone());
        format = format.withFormat(ann.getPattern().trim());

The withFormat() call overwrites the DateTimeFormatter created by withTimeZone() call.
So the resulting object in the _formatter field of JacksonJodaDateFormat will have the iZone field value set to null.

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.15good first issueIssue that seems easy to resolve and is likely a good candidate for contributors new to projectneed-test-caseReproduction of the problem requires a test case

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions