-
Notifications
You must be signed in to change notification settings - Fork 110
Instant
support Chrono fields
#437
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
Comments
Duplicate of #325, please share your use cases in detail there. In particular, it seems at the moment that the needs for adjusting the precision for API calls and DB storage is already covered by rounding not at the moment of constructing the |
We use Exposed. Guess I could create a new db column but there's loads of places we use it. After parsing API requests from. Third party clients. It's pretty common. |
Also turning it to a string to remove milliseconds then back to an instant, is pretty poor performance wise. |
I haven't used Exposed, so this doesn't tell me much, sorry.
If I understood you correctly, third-party clients send you something like If you can give some examples of the code that is inconvenient to write and explain its purpose, it will help a lot. Pseudocode is also fine.
That's not what I was suggesting. I meant that if you need to send a string somewhere anyway, you may as well lower the precision in the string itself, without rounding the |
Most other date packages support setting the fields of each time unit on something like
ZonedDateTime
DateTime
etcWould be nice if we could do
System.now().withHour(0).withMinute(0).withSecond(0).withNano(0)
etcMostly for flexibility in the API, but there is cases where we don't want/need nanosecond precision, API calls, DB storage etc.
The text was updated successfully, but these errors were encountered: