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

Fix LocalDate persisting dates as the day before #3248

Merged
merged 4 commits into from
Dec 5, 2024

Conversation

radovanradic
Copy link
Contributor

@radovanradic radovanradic commented Nov 25, 2024

Should fix issue that was also discussed here

@@ -100,7 +100,7 @@ default QueryStatement<PS, IDX> setDynamic(
if (value instanceof Date date) {
return setDate(statement, index, date);
} else {
return setDate(statement, index, convertRequired(value, Date.class));
return setDate(statement, index, convertRequired(value, java.sql.Date.class));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need to convert to java.sql.Date or else converter from core that converts to UTC will be used. And we need sql date anyway.

@radovanradic radovanradic marked this pull request as ready for review November 25, 2024 15:45
@radovanradic radovanradic added the type: bug Something isn't working label Nov 26, 2024
@radovanradic radovanradic merged commit 06c93d2 into 4.10.x Dec 5, 2024
53 checks passed
@radovanradic radovanradic deleted the localdate-issue branch December 5, 2024 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Micronaut Data JDBC persisting dates as the day before when connected to a Postgresql database
2 participants