Skip to content

Commit b976fb6

Browse files
committed
#506 quickfix to compare times with and without timezone
1 parent 39c715a commit b976fb6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

GeoHealthCheck/models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,10 @@ def init_datetimes(self, interval_mins):
687687

688688
def has_expired(self):
689689
now = datetime.now(timezone.utc)
690-
return now > self.end_time
690+
691+
# See issue https://github.com/geopython/GeoHealthCheck/issues/506
692+
end_time = self.end_time.replace(tzinfo=timezone.utc)
693+
return now > end_time
691694

692695
def obtain(self, owner, frequency):
693696
if not self.has_expired():

0 commit comments

Comments
 (0)