Skip to content

Conversation

@SHARMA1525
Copy link

@SHARMA1525 SHARMA1525 commented Nov 7, 2025

This update fixes DST-related inconsistencies in the Day.js timezone plugin.
Previously, timezone offsets were not recalculated when Dayjs instances were reinitialized through methods like .add(), .set(), or .startOf(), causing 1-hour drifts around DST transitions.

Fix:
Patched the private init() method to recompute the timezone offset whenever $x.$timezone is present:

Ensures accurate offsets across all time manipulation methods.

Prevents DST-related time shifts.

Keeps full backward compatibility.

Result:
DST offsets now remain correct for timezone-aware instances across all operations.
All 93 test suites pass successfully.

Linked Issue
#2957

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.

1 participant