Skip to content

Support aware datetimes when relative time defaults to now - #469

Merged
mahmoud merged 1 commit into
mahmoud:masterfrom
codewithfourtix:fix-relative-time-aware-datetime
Sep 7, 2026
Merged

mahmoud merged 1 commit into
mahmoud:masterfrom
codewithfourtix:fix-relative-time-aware-datetime

Conversation

@codewithfourtix

Copy link
Copy Markdown
Contributor

Calling relative_time() with an aware datetime and no comparison time raises TypeError because the default current time is naive. Use the input timezone for the default comparison.

Adds naive, UTC, and fixed-offset regressions.

@mahmoud
mahmoud merged commit 8789df2 into mahmoud:master Sep 7, 2026
1 check passed
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.

2 participants