-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix @QueryValue of LocalDateTime type for 3.10.x #9970
Conversation
@sdelamo I tried to backport code from 4.x but it's really painfull because of Java 8 requirement |
dc9c4ad
to
dae72a7
Compare
Removed irrelevan code formatting |
try { | ||
DateTimeFormatter formatter = resolveFormatter(context); | ||
// Treat missing zone as UTC | ||
return Optional.of(formatter.format(object.atOffset(ZoneOffset.UTC))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not ZoneOffset.systemDefault
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im against any implicit time zone at all, be it UTC or systemDefault. Why does this converter need to support RFC 1123? RFC 1123 makes no sense for LDT, we should not support it just like the JDK doesnt support it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dstepanov because systemDefault offset on client and server could be different
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yawkat I tried to minimize changes without changing the current semantic, especialy it was properly handled in 4.x
I added a test to the TCK. However, I don't reproduce the issue #10027 |
@sdelamo what the difference between TCK and DateTimeConversionSpec? Because if I rollback changes in converter, DateTimeConversionSpec reproducibly fails |
ok, ive looked at the code some more. the reason why it works on 4 but not 3 is that we changed away from using RFC 1123 datetime by default, to ISO 8601 timestamps. I am against fixing this by adding a timezone out of thin air. However I think an alternative solution is possible and I will update this PR. |
Fix for #9969 with test case