Skip to content

fix: use calendar-based DateTime construction to avoid DST drift#97

Open
ericaig wants to merge 1 commit into
iamvivekkaushik:devfrom
ericaig:fix-dst
Open

fix: use calendar-based DateTime construction to avoid DST drift#97
ericaig wants to merge 1 commit into
iamvivekkaushik:devfrom
ericaig:fix-dst

Conversation

@ericaig
Copy link
Copy Markdown

@ericaig ericaig commented Dec 11, 2025

Using startDate.add(Duration(days: n)) caused the generated dates to shift by one hour during DST transitions (e.g., 2025-10-26 in Spain), resulting in duplicate or incorrect days. Replaced the increment logic with a component-based DateTime constructor to ensure consistent midnight dates regardless of timezone offset changes.

Using startDate.add(Duration(days: n)) caused the generated dates to shift
by one hour during DST transitions (e.g., 2025-10-26 in Spain), resulting in
duplicate or incorrect days. Replaced the increment logic with a
component-based DateTime constructor to ensure consistent midnight dates
regardless of timezone offset changes.
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