-
-
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
diff for same day (one UTC, one regular) gives 10800000 #926
Comments
This should give you the correct result
Cause you are comparing one UTC time with one local time above. |
Right, I've mentioned the 2nd line works properly. But in the 1st case, should the diff be 0 or maybe 1, if timezone difference? |
Apparently, there's a bug in calculating diff between two different timezones. |
Current workaround.
|
fixed |
🎉 This issue has been resolved in version 1.8.33 🎉 The release is available on: Your semantic-release bot 📦🚀 |
How is one supposed to calculate the difference between two timezones? Get the UTC string with format 'Z' and then parse int? EDIT: got it with |
Describe the bug
UTC diff for same day gives 10800000
Expected behavior
diff = 0 or maybe 1, if timezone difference
Information
The text was updated successfully, but these errors were encountered: