-
Notifications
You must be signed in to change notification settings - Fork 28
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
Timestamp is formatting milliseconds incorrectly #200
Comments
hi @pcasaes, thanks for reporting this issue. we will take a look. we purposely walked away from javax.time because it requires desugaring to some customers even though they don't need it. we felt it's a bad experience to ask users to add something they don't want just because they use our library. so we'll see if we have other options to fix this. |
@pcasaes this issue is fixed in |
Hi, I took a look at the code and I see that the https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html
|
btw. I miswrote.
It's been available since Java 8. |
@pcasaes we made it thread safe in |
Describe the bug
When converting the unix timestamp in milliseconds
1700617928023
to ISO we are seeing2023-11-22T01:52:08.23Z
But it should be
2023-11-22T01:52:08.023Z
To Reproduce
Steps to reproduce the behavior:
From the code in
dateTimeNowString
Expected behavior
The output should always present 3 digits for milliseconds.
Platform (please complete the following information):
Additional context
A quick fix would be to use the following pattern
yyyy-MM-dd'T'HH:mm:ss'.'SSSzzz
But always instantiating a formatter most likely has performance implications.
Maybe use
javax.time
The text was updated successfully, but these errors were encountered: