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
Description:
When comparing times using isSameOrAfter() in combination with tz('UTC', true), two issues occur:
tz('UTC', true) with keepLocalTime shifts the displayed times despite the keepLocalTime: true parameter
isSameOrAfter() returns incorrect comparison results when used with these timezone-converted times
With keepLocalTime: true, the times should remain as 07:00:00 and 08:00:00 without timezone shifting
isSameOrAfter() should return false since 07:00:00 is not after 08:00:00
Actual Behavior:
Times are shifted by timezone offset (showing as 12:00:00 and 13:00:00 in EST timezone)
isSameOrAfter() returns true incorrectly, while direct timestamp comparison (valueOf()) correctly returns false
Information
Day.js Version v1.11.10
OS: MacOS
NodeJS
Time zone: EST (UTC-5)
The text was updated successfully, but these errors were encountered:
Describe the bug
Description:
When comparing times using isSameOrAfter() in combination with tz('UTC', true), two issues occur:
tz('UTC', true) with keepLocalTime shifts the displayed times despite the keepLocalTime: true parameter
isSameOrAfter() returns incorrect comparison results when used with these timezone-converted times
Steps to Reproduce:
Current Output:
Expected behavior
With keepLocalTime: true, the times should remain as 07:00:00 and 08:00:00 without timezone shifting
isSameOrAfter() should return false since 07:00:00 is not after 08:00:00
Actual Behavior:
Times are shifted by timezone offset (showing as 12:00:00 and 13:00:00 in EST timezone)
isSameOrAfter() returns true incorrectly, while direct timestamp comparison (valueOf()) correctly returns false
Information
The text was updated successfully, but these errors were encountered: