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

dayjs object with timezone GMT 0 return (maybe?) wrong date when calling .startOf('date') #2144

Open
ororsatti opened this issue Nov 28, 2022 · 2 comments

Comments

@ororsatti
Copy link

ororsatti commented Nov 28, 2022

Describe the bug
Adding a timezone GMT 0 to a date and trying to get the start of the day return date with the wrong hour.
Maybe I don't fully understand timezones, but from was I understand, the function startOf should give me the start of the current day - which is 00:00.

Why would GMT 0 behave any different? does it have any special property I am not aware of?

on any case, here is a sandbox example with different dayjs object with different timezones, and all return the same values when calling startOf , except GMT 0

Expected behavior
getting 00:00 when calling startOf('date')

Information

  • Day.js Version 1.11.5
  • OS: MacOS
  • Browser chrome
  • Time zone: GMT +02:00
@BePo65
Copy link
Contributor

BePo65 commented Nov 29, 2022

Duplicate of issue #2126 -solved by pr #2118

@ororsatti
Copy link
Author

Duplicate of issue #2126 -solved by pr #2118

Any prediction on when its going to be merged?

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

No branches or pull requests

2 participants