Skip to content

fix: preserve datetime fold in FakeDatetime conversions#601

Open
l46983284-cpu wants to merge 1 commit into
spulec:masterfrom
l46983284-cpu:fix/dst-fold-us-eastern-596
Open

fix: preserve datetime fold in FakeDatetime conversions#601
l46983284-cpu wants to merge 1 commit into
spulec:masterfrom
l46983284-cpu:fix/dst-fold-us-eastern-596

Conversation

@l46983284-cpu

Copy link
Copy Markdown

Summary

datetime_to_fakedatetime dropped the fold flag, so DST fall-back conversions through FakeDatetime.astimezone collapsed the second 01:00 (EST) into EDT under freeze_time (issue #596).

Pass fold through when constructing FakeDatetime.

Test plan

  • Reproduced issue script on Python 3.14.4 Daytona sandbox
  • pytest tests/test_dst_fold_astimezone.py PASS on 3.14.4 after patch

Fixes #596

datetime_to_fakedatetime dropped the fold flag, so DST fall-back hours
converted via FakeDatetime.astimezone lost EST vs EDT (issue spulec#596).

Signed-off-by: Alex Chen <l46983284@gmail.com>
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.

Freezegun Causes Repeated EDT 1am During DST

1 participant