Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timezone problem in ticket closer #318

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

HebaruSan
Copy link
Member

Problem

The ticket closer has thrown this the last 2 days:

image

Cause

Python throws a runtime exception if time zones aren't handled to its liking. 🐍

datetime.now() doesn't have timezone info associated with it, so by process of elimination issue.updated_at must have it. Maybe we updated the GitHub API library recently. 🤷

Changes

Now we pass timezone.utc to datetime.now() so both parts of the comparison will have timezone data.

I'll self review this so we can see if it works in tomorrow's run.

@HebaruSan HebaruSan added Bug Something isn't working good first issue Good for newcomers labels Nov 13, 2023
@HebaruSan HebaruSan merged commit d09c4a1 into KSP-CKAN:master Nov 13, 2023
3 checks passed
@HebaruSan HebaruSan deleted the fix/closer-tz branch November 13, 2023 05:44
@techman83
Copy link
Member

Thanks for fixing this @HebaruSan !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants