feat: complete timezone support for NFO dateadded fields
- Fix NFO dateadded timestamps to use local timezone instead of UTC - Convert Radarr/Sonarr import dates from UTC to local timezone for NFO files - Update webhook episode processing to use local time for new downloads - Convert file modification time fallbacks to local timezone - Preserve historical dates (aired, premiered) in original UTC format - Replace all placeholder logging functions with centralized timezone-aware logging - Add convert_utc_to_local() utility function for timestamp conversion - Now all logs AND NFO files show consistent local timezone formatting Users with TZ=America/New_York will now see: - Logs: [2025-09-14T09:37:00-04:00] - NFO files: <dateadded>2025-09-14T09:37:00-04:00</dateadded>
This commit is contained in:
+1
-4
@@ -7,10 +7,7 @@ from pathlib import Path
|
||||
from datetime import datetime, timezone
|
||||
from typing import Dict, List, Optional, Tuple, Any
|
||||
|
||||
|
||||
def _log(level: str, msg: str):
|
||||
"""Placeholder logging function - replace with your actual logger"""
|
||||
print(f"[{datetime.now().isoformat()}] {level}: {msg}")
|
||||
from core.logging import _log
|
||||
|
||||
|
||||
class NFOGuardDatabase:
|
||||
|
||||
Reference in New Issue
Block a user