Skip to content

Comments

Fix offset-naive vs offset-aware datetime comparison in changelog#504

Merged
IanButterworth merged 3 commits intomasterfrom
ib/tz_fix
Feb 18, 2026
Merged

Fix offset-naive vs offset-aware datetime comparison in changelog#504
IanButterworth merged 3 commits intomasterfrom
ib/tz_fix

Conversation

@IanButterworth
Copy link
Member

PyGithub may return naive or aware datetimes for closed_at and created_at depending on version. Add _ensure_utc() helper to normalize datetimes before comparison, preventing TypeError.

Fixes #492

PyGithub may return naive or aware datetimes for closed_at and
created_at depending on version. Add _ensure_utc() helper to
normalize datetimes before comparison, preventing TypeError.

Fixes #492

Co-authored-by: Claude <noreply@anthropic.com>
@IanButterworth IanButterworth merged commit 8c19322 into master Feb 18, 2026
2 checks passed
@IanButterworth IanButterworth deleted the ib/tz_fix branch February 18, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"can't compare offset-naive and offset-aware datetimes"

2 participants