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

Converting an timezoned instance to another timezone returns the wrong result #1305

Closed
Pikachews opened this issue Jan 4, 2021 · 3 comments · Fixed by #1307 or backstage/backstage#4967
Labels
☢️Bug Something isn't working released

Comments

@Pikachews
Copy link

Describe the bug
I am trying to convert a time that I parsed using dayjs.tz into another timezone, but it appears to return the incorrect value.
This appears to be a regression, as it appears to work properly in 1.9.7, though I'm not sure when this issue started.

In 1.9.7 (working properly): https://codepen.io/pikachews/pen/ZEpxwGE
image

In 1.10.1 (working incorrectly): https://codepen.io/pikachews/pen/NWRYoGo
image

Expected behavior
It should properly convert and return the correct time.

Information

  • Day.js Version: 1.10.1
  • OS: Windows 10
  • Browser: Chrome 87
  • Time zone: GMT-08:00 PST (Pacific Standard Time)]
@Pikachews
Copy link
Author

Seems to work properly in 1.9.8 and broke in 1.10.0.

@iamkun
Copy link
Owner

iamkun commented Jan 4, 2021

bug confirmed, will fix soon

@iamkun iamkun added the ☢️Bug Something isn't working label Jan 4, 2021
iamkun added a commit that referenced this issue Jan 4, 2021
iamkun added a commit that referenced this issue Jan 4, 2021
iamkun added a commit that referenced this issue Jan 4, 2021
iamkun pushed a commit that referenced this issue Jan 5, 2021
## [1.10.2](v1.10.1...v1.10.2) (2021-01-05)

### Bug Fixes

* fix parse regex bug ([#1307](#1307)) ([db2b6a5](db2b6a5)), closes [#1305](#1305)
* remove module entry in package.json to revert 1.10.1 change ([#1314](#1314)) ([824dcb8](824dcb8))
* update devHelper add warning "passing Year as a Number will be parsed as a Unix timestamp" ([#1315](#1315)) ([b0dda31](b0dda31))
@iamkun
Copy link
Owner

iamkun commented Jan 5, 2021

🎉 This issue has been resolved in version 1.10.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@iamkun iamkun added the released label Jan 5, 2021
andrewhood125ruhuc added a commit to andrewhood125ruhuc/SidRH2 that referenced this issue May 10, 2022
## [1.10.2](iamkun/dayjs@v1.10.1...v1.10.2) (2021-01-05)

### Bug Fixes

* fix parse regex bug ([#1307](iamkun/dayjs#1307)) ([db2b6a5](iamkun/dayjs@db2b6a5)), closes [#1305](iamkun/dayjs#1305)
* remove module entry in package.json to revert 1.10.1 change ([#1314](iamkun/dayjs#1314)) ([824dcb8](iamkun/dayjs@824dcb8))
* update devHelper add warning "passing Year as a Number will be parsed as a Unix timestamp" ([#1315](iamkun/dayjs#1315)) ([b0dda31](iamkun/dayjs@b0dda31))
andrewhood125ruhuc added a commit to andrewhood125ruhuc/SidRH2 that referenced this issue May 10, 2022
## [1.10.2](iamkun/dayjs@v1.10.1...v1.10.2) (2021-01-05)

### Bug Fixes

* fix parse regex bug ([#1307](iamkun/dayjs#1307)) ([db2b6a5](iamkun/dayjs@db2b6a5)), closes [#1305](iamkun/dayjs#1305)
* remove module entry in package.json to revert 1.10.1 change ([#1314](iamkun/dayjs#1314)) ([824dcb8](iamkun/dayjs@824dcb8))
* update devHelper add warning "passing Year as a Number will be parsed as a Unix timestamp" ([#1315](iamkun/dayjs#1315)) ([b0dda31](iamkun/dayjs@b0dda31))
splashwizard pushed a commit to splashwizard/tracking-time that referenced this issue Oct 21, 2024
## [1.10.2](iamkun/dayjs@v1.10.1...v1.10.2) (2021-01-05)

### Bug Fixes

* fix parse regex bug ([#1307](iamkun/dayjs#1307)) ([db2b6a5](iamkun/dayjs@db2b6a5)), closes [#1305](iamkun/dayjs#1305)
* remove module entry in package.json to revert 1.10.1 change ([#1314](iamkun/dayjs#1314)) ([824dcb8](iamkun/dayjs@824dcb8))
* update devHelper add warning "passing Year as a Number will be parsed as a Unix timestamp" ([#1315](iamkun/dayjs#1315)) ([b0dda31](iamkun/dayjs@b0dda31))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☢️Bug Something isn't working released
Projects
None yet
2 participants