Improve timezone handling, db models convert naive/timezone-aware
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import logging
|
||||
import threading
|
||||
|
||||
from . import utc_now
|
||||
from . import now_utc
|
||||
from .models import Hostname, User
|
||||
from datetime import timedelta
|
||||
|
||||
@@ -18,7 +18,7 @@ def cleanup_expired(app):
|
||||
Returns:
|
||||
Number of expired hostnames processed.
|
||||
"""
|
||||
now = utc_now()
|
||||
now = now_utc()
|
||||
expired_count = 0
|
||||
|
||||
for hostname in Hostname.select().join(User).where(
|
||||
|
||||
Reference in New Issue
Block a user