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

LocalDate with UTC timezone instead of system default #1305

Closed
toth-istvan-zoltan opened this issue Jul 29, 2021 · 1 comment · Fixed by #1787
Closed

LocalDate with UTC timezone instead of system default #1305

toth-istvan-zoltan opened this issue Jul 29, 2021 · 1 comment · Fixed by #1787

Comments

@toth-istvan-zoltan
Copy link

As of now, LocalDate is converted into milliseconds with the system default timezone: JavaDateColumnType.kt

This does not work in our use case where:

  • we use Exposed on servers, on Android devices, on Raspberry PI devices,
  • we transfer SQLite databases between these.

With system default timezone there is no guarantee that the day will be the same on different devices.

Using UTC for the millisecond conversion would solve this problem, but changing the current behaviour might break existing installations.

What would be the best way to add the option to use UTC? If it can be a general solution I'll put it into a pull request of course.

Thank you for your help.

@cleidiano
Copy link

The change to use UTC instead ZoneId.systemDefault() will be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants