-
Notifications
You must be signed in to change notification settings - Fork 12
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
EBeanServer should treat dates it receives as UTC #419
Comments
I've confirmed that the only models that use any keys that are timestamps are the execution classes. ReportExecution and AlertExecution. |
log snippet from the failing tests:
Notice that the in-app log statement logs To reiterate the current hypothesis given this context: because the UTC date is ahead of local time, the partition creator creates The partition creator is unaffected despite using the same pool because the partition date is computed in the application code rather than by the database, so it's still using UTC. It's somewhat ironic that setting the VM timezone is manifesting in the database being wrong and the application being right. |
This might only be a problem with the test
EbeanServer
but I'm opening this regardless to confirm.In #398 I discovered an issue where the Ebean was using the local time zone to compute the partition date for execution records. The repository was using UTC. This causes an issue where the repo thinks that it's created the partition for the given record, but the insert still fails because the dates don't actually match due to the timezone discrepancy.
I was able to fix this by manually configuring the server instance used by the integration tests, but this may still be an issue in production. I also am afraid that this swap-over will mess up existing repositories keyed by date, since a key that would have previously mapped to local time will be mapped to UTC after the configuration change. I believe the only existing repo that uses this is ReportExecutionRepository, but I haven't confirmed this just yet.
The text was updated successfully, but these errors were encountered: