You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Calling utc() without passing true as parameter should change the current time to UTC. However this doesn't always work on a dayjs object returned by tz() where the second parameter is set to true (to keep current time).
'2021-02-01T15:00:00Z' => NON DST: INCORRECT
'2021-09-01T13:00:00Z' => DST: CORRECT
Expected behavior
For non DST it should return
'2021-02-01T14:00:00Z'
Information
Day.js Version [1.10.7]
OS: [MacOS 11.5.2]
Browser [Chrome 93]
Time zone: [GMT+02:00 DST (Europe/Paris)]
The text was updated successfully, but these errors were encountered:
hbj
changed the title
tz(timezone, true).utc() is not channging the time to UTCtz(timezone, true).utc() is not changing the time to UTC
Sep 22, 2021
hbj
changed the title
tz(timezone, true).utc() is not changing the time to UTCtz(timezone, true).utc() is not always changing the time to UTC
Sep 22, 2021
Describe the bug
Calling
utc()
without passingtrue
as parameter should change the current time to UTC. However this doesn't always work on a dayjs object returned bytz()
where the second parameter is set totrue
(to keep current time).Example (
Europe/Paris
isGMT+1
/GMT+2
in DST):returns
Expected behavior
For non DST it should return
Information
The text was updated successfully, but these errors were encountered: