Skip to content
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

DateMidnightSerializer doesn't take timezone into account #112

Open
msiniy opened this issue Nov 21, 2019 · 2 comments
Open

DateMidnightSerializer doesn't take timezone into account #112

msiniy opened this issue Nov 21, 2019 · 2 comments
Labels
need-test-case Reproduction of the problem requires a test case

Comments

@msiniy
Copy link

msiniy commented Nov 21, 2019

I've faced a problem with DateMidnightSerializer. It doesn't respect the Timezone from serialization context.
I think it's the only class that uses JacksonJodaDateFormat.createFormatterWithLocale

gen.writeString(_format.createFormatterWithLocale(provider).print(value));

while the others use JacksonJodaDateFormat.createFormatter
.append(_format.createFormatter(provider).withOffsetParsed().print(value));

and therefore aren't affected.

@cowtowncoder cowtowncoder added 2.11 need-test-case Reproduction of the problem requires a test case labels Apr 16, 2020
@cowtowncoder
Copy link
Member

From description, I am guessing it might be as simple as adding missing .withOffsetParsed() in there, but I realized that I do not have means to reproduce the issue yet. Would it be possible to add a very simple reproduction here? That way I can see the problem, verify fix & guard against regression going forward.

@cowtowncoder cowtowncoder removed the 2.11 label Apr 16, 2020
@cowtowncoder
Copy link
Member

Also worth noting: DateMidnight type itself has been deprecated in Joda for years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-test-case Reproduction of the problem requires a test case
Projects
None yet
Development

No branches or pull requests

2 participants