-
Notifications
You must be signed in to change notification settings - Fork 456
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
Java 8 LocalDate/Time conversion #1218
Comments
May I suggest storing them as strings? (or possibly numbers to take less storage space, e.g. |
Changing the on disk representation would break anyone with existing data. The "nicest" way to change that would be to use a flag on |
OK. I've come up with a plan, finally, I'm ok with. Here's what I'm thinking:
How does that sound to you? I like that it course corrects an admittedly bad design without immediately breaking any existing databases. |
That sounds pretty good to me! |
If you could look over the commit above and check my sanity, but that seems to be what you need. Dates are easy to mess up so I'd love another set of eyes to double check me. |
Hi, currently the LocalDateConverter is using systemDefault() as the zone id for converting from Date to LocalDate and vice verse.
This behaviour, however, will create a dependency on the OS timezone and thus, contradicts to the concept of LocalDate (date-time object without timezone). It also leads to inconsistency if the code are executed on multiple systems with different timezones, for example, persisting a LocalDate
2018-12-02
will result as2018-12-01 17:00:00.000Z
on UTC+7, and2018-12-02 00:00:00.000Z
on UTC.I suggest using UTC timezone instead of systemDefault() one for java 8 LocalDate/Time conversion.
The text was updated successfully, but these errors were encountered: