-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
UTC Plugin Milliseconds parsing #544
Comments
@ilueckel Plus, just wondering what's this date format that contains 6 digits millisecond? |
Restricting it to three digits would fix it. I'll guess I do this instead. The date strings are generated in a Spring Boot Web App from |
This comment has been minimized.
This comment has been minimized.
I tried to use
but result was still
|
Yes, currently we only support parsing 3 digits millisecond both |
@iamkun |
What is the motivation for not supporting more digits? |
Of course, we could support it if needed. |
I am scratching my head and the work around actually fix this https://stackoverflow.com/questions/61368563/day-js-is-not-converting-utc-to-local-time |
sorry for the inconvenience, and it is fixed in #1010 |
## [1.8.34](v1.8.33...v1.8.34) (2020-08-20) ### Bug Fixes * Fix Timezone plugin to preserve milliseconds while changing timezone ([#1003](#1003)) ([5f446ed](5f446ed)), closes [#1002](#1002) * support parsing unlimited decimals of millisecond ([#1010](#1010)) ([d1bdd36](d1bdd36)), closes [#544](#544) * update Duration plugin to support global locale ([#1008](#1008)) ([1c49c83](1c49c83)), closes [#1007](#1007)
🎉 This issue has been resolved in version 1.8.34 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hi, there seems to be another problem that manifests very similarly and might be connected. Conversion from UTC to local time doesn't work when parsing it as 'DD/MM/YYYY H:mm'.
|
## [1.8.34](iamkun/dayjs@v1.8.33...v1.8.34) (2020-08-20) ### Bug Fixes * Fix Timezone plugin to preserve milliseconds while changing timezone ([#1003](iamkun/dayjs#1003)) ([5f446ed](iamkun/dayjs@5f446ed)), closes [#1002](iamkun/dayjs#1002) * support parsing unlimited decimals of millisecond ([#1010](iamkun/dayjs#1010)) ([d1bdd36](iamkun/dayjs@d1bdd36)), closes [#544](iamkun/dayjs#544) * update Duration plugin to support global locale ([#1008](iamkun/dayjs#1008)) ([1c49c83](iamkun/dayjs@1c49c83)), closes [#1007](iamkun/dayjs#1007)
## [1.8.34](iamkun/dayjs@v1.8.33...v1.8.34) (2020-08-20) ### Bug Fixes * Fix Timezone plugin to preserve milliseconds while changing timezone ([#1003](iamkun/dayjs#1003)) ([5f446ed](iamkun/dayjs@5f446ed)), closes [#1002](iamkun/dayjs#1002) * support parsing unlimited decimals of millisecond ([#1010](iamkun/dayjs#1010)) ([d1bdd36](iamkun/dayjs@d1bdd36)), closes [#544](iamkun/dayjs#544) * update Duration plugin to support global locale ([#1008](iamkun/dayjs#1008)) ([1c49c83](iamkun/dayjs@1c49c83)), closes [#1007](iamkun/dayjs#1007)
## [1.8.34](iamkun/dayjs@v1.8.33...v1.8.34) (2020-08-20) ### Bug Fixes * Fix Timezone plugin to preserve milliseconds while changing timezone ([#1003](iamkun/dayjs#1003)) ([5f446ed](iamkun/dayjs@5f446ed)), closes [#1002](iamkun/dayjs#1002) * support parsing unlimited decimals of millisecond ([#1010](iamkun/dayjs#1010)) ([d1bdd36](iamkun/dayjs@d1bdd36)), closes [#544](iamkun/dayjs#544) * update Duration plugin to support global locale ([#1008](iamkun/dayjs#1008)) ([1c49c83](iamkun/dayjs@1c49c83)), closes [#1007](iamkun/dayjs#1007)
Describe the bug
When I use the UTC-Plugin and try to parse a string with milliseconds, it changes the time (I'm CET). If I append a "Z" to my string, this does not happen (see example)
Expected behavior
Parsing a string without milliseconds creates a correct representation of the date (with or without "Z" at the end). Adding milliseconds to the script should not change this behavior.
Example
Information
The text was updated successfully, but these errors were encountered: