diff --git a/qwc_services_core/tenant_handler.py b/qwc_services_core/tenant_handler.py index 76429a0..195ec83 100644 --- a/qwc_services_core/tenant_handler.py +++ b/qwc_services_core/tenant_handler.py @@ -1,4 +1,4 @@ -from datetime import datetime +import datetime import os import re from flask import request @@ -115,7 +115,7 @@ def register_handler(self, handler_name, tenant, handler): self.handler_cache[handler_name] = handlers handlers[tenant] = { 'handler': handler, - 'last_update': datetime.utcnow() + 'last_update': datetime.datetime.now(datetime.UTC) } return handler @@ -133,8 +133,9 @@ def last_config_update(self, service_name, tenant): ] for path in paths: if os.path.isfile(path): - timestamp = datetime.utcfromtimestamp( - os.path.getmtime(path) + timestamp = datetime.datetime.fromtimestamp( + os.path.getmtime(path), + datetime.UTC ) if ( last_config_update is None