KSP-CKAN / NetKAN-Infra

NetKAN Infrastructure Repo
MIT License
3 stars 6 forks source link

Fix timezone problem in ticket closer #318

Closed HebaruSan closed 1 year ago

HebaruSan commented 1 year ago

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.

techman83 commented 1 year ago

Thanks for fixing this @HebaruSan !