From fdc8703044f4bbd986f7a133ba5dc772b29d0ce6 Mon Sep 17 00:00:00 2001 From: sbcrumb Date: Sat, 18 Oct 2025 14:40:57 -0400 Subject: [PATCH] fix: fix logs to ETC vs UTC --- VERSION | 2 +- api/routes.py | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 79a6144..59aa62c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.4.4 +2.4.5 diff --git a/api/routes.py b/api/routes.py index 4e2e12b..4839e8e 100644 --- a/api/routes.py +++ b/api/routes.py @@ -542,8 +542,11 @@ async def manual_scan(background_tasks: BackgroundTasks, path: Optional[str] = N async def run_scan(): from datetime import datetime + import time start_time = datetime.now() - print(f"🚀 MANUAL SCAN STARTED: {scan_type} scan initiated at {start_time.strftime('%Y-%m-%d %H:%M:%S')}") + # Get local time for display + local_start = datetime.fromtimestamp(start_time.timestamp()) + print(f"🚀 MANUAL SCAN STARTED: {scan_type} scan initiated at {local_start.strftime('%Y-%m-%d %H:%M:%S')} (local time)") paths_to_scan = [] if path: @@ -629,7 +632,9 @@ async def manual_scan(background_tasks: BackgroundTasks, path: Optional[str] = N end_time = datetime.now() duration = end_time - start_time duration_str = str(duration).split('.')[0] # Remove microseconds - print(f"✅ MANUAL SCAN COMPLETED: {scan_type} scan finished at {end_time.strftime('%Y-%m-%d %H:%M:%S')}") + # Get local time for display + local_end = datetime.fromtimestamp(end_time.timestamp()) + print(f"✅ MANUAL SCAN COMPLETED: {scan_type} scan finished at {local_end.strftime('%Y-%m-%d %H:%M:%S')} (local time)") print(f"⏱️ MANUAL SCAN DURATION: {duration_str} (total time: {duration.total_seconds():.1f} seconds)") background_tasks.add_task(run_scan)