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

Invalid value for NanoOfSecond between 12am and 1am #3475

Open
mkubele opened this issue May 14, 2024 · 2 comments
Open

Invalid value for NanoOfSecond between 12am and 1am #3475

mkubele opened this issue May 14, 2024 · 2 comments
Assignees
Labels
status: waiting-for-triage An issue we've not yet triaged

Comments

@mkubele
Copy link

mkubele commented May 14, 2024

DateTimeException is thrown when select operation with entity that contains java.time.LocalTime is performed between 12am and 1am (00:00-01:00)
error message:

Invalid value for NanoOfSecond (valid values 0 - 999999999): -329000000
java.time.DateTimeException: Invalid value for NanoOfSecond (valid values 0 - 999999999): -329000000

note that the value is random.

demo project is available HERE
Steps to reproduce:

  • Set time on your machine between 00:00-01:00
  • Either run:
    • test unit test
    • docker-compose up -d and start the application
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 14, 2024
@schauder
Copy link
Contributor

This sounds very much like a Hibernate issue, since all the JPA mapping and almost all of the conversions are done by it.
I recommend creating a reproducer based purely on Hibernate and submitting an issue with them.

If you think this is actually a Spring Data issue, please provide a reproducer for the issue including a test case that demonstrates the correct behaviour using the EntityManager directly.

@schauder schauder closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2024
@schauder schauder added the for: external-project For an external project and not something we can fix label May 15, 2024
@mkubele
Copy link
Author

mkubele commented May 15, 2024

I am not able to provide correct behaviour using the EntityManager in spring boot project, however it works in hibernate-only project, without springboot. Project available HERE
I tested it with Hibernate 6.5.0.CR2 and springboot 3.3.0-RC1, that uses the same Hibernate version.

@schauder schauder reopened this May 17, 2024
@schauder schauder removed the for: external-project For an external project and not something we can fix label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests

3 participants