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

[bug] Fix startOf with active timezone/UTC #2481

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

michelengelen
Copy link

The overloaded startOf function did call the tz function again which resulted in a duplicate subtraction of the timezone offset.

Simply removing it did yield the correct values in all cases I did encounter.

I did also add some tests so that the coverage stays up! 👍🏼

Fixes #2373 and #2303

@flaviendelangle
Copy link

The method has been added in https://github.com/iamkun/dayjs/pull/1229/files
Does the problem went away since then?

@michelengelen
Copy link
Author

The method has been added in https://github.com/iamkun/dayjs/pull/1229/files Does the problem went away since then?

I did double check the tests (and ran some more on the side myself) and as far as i can see the problem does not appear anymore with or without the overloaded startOf() method.

As long as I did not have overlooked something this should fix the issue.

@michelengelen
Copy link
Author

@iamkun is this on your radar?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

startOf not working when the timezone is set to UTC+0:00
2 participants