Switch to UTC timestamps, output in local time
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
|
||||
import logging
|
||||
import threading
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from . import utc_now
|
||||
from .models import Hostname, User
|
||||
from datetime import timedelta
|
||||
|
||||
|
||||
def cleanup_expired(app):
|
||||
@@ -17,7 +18,7 @@ def cleanup_expired(app):
|
||||
Returns:
|
||||
Number of expired hostnames processed.
|
||||
"""
|
||||
now = datetime.now(datetime.timezone.utc)
|
||||
now = utc_now()
|
||||
expired_count = 0
|
||||
|
||||
for hostname in Hostname.select().join(User).where(
|
||||
|
||||
Reference in New Issue
Block a user