diff --git a/dev_session.py b/dev_session.py index 25b3ad0a..478876c4 100644 --- a/dev_session.py +++ b/dev_session.py @@ -443,6 +443,10 @@ def select_task(token: str, project_id: str, tasks_db_id: str) -> Optional[Dict] import subprocess from datetime import datetime +from zoneinfo import ZoneInfo # Für Zeitzonen-Handling + +# Definiere die Zeitzone für Berlin +BERLIN_TZ = ZoneInfo("Europe/Berlin") # --- Git Summary Generation --- @@ -660,13 +664,13 @@ def report_status_to_notion( report_content = "\n".join(report_lines) # Notion Blöcke für die API erstellen - timestamp = datetime.utcnow().strftime('%Y-%m-%d %H:%M') + timestamp = datetime.now(BERLIN_TZ).strftime('%Y-%m-%d %H:%M') notion_blocks = [ { "object": "block", "type": "heading_2", "heading_2": { - "rich_text": [{"type": "text", "text": {"content": f"🤖 Status-Update ({timestamp} UTC)"}}] + "rich_text": [{"type": "text", "text": {"content": f"🤖 Status-Update ({timestamp} Berlin Time)"}}] } }, { diff --git a/notion_commit_hook.py b/notion_commit_hook.py index 5ff4e0f0..43ec6596 100644 --- a/notion_commit_hook.py +++ b/notion_commit_hook.py @@ -4,6 +4,10 @@ import sys import json import subprocess from datetime import datetime +from zoneinfo import ZoneInfo # Für Zeitzonen-Handling + +# Definiere die Zeitzone für Berlin +BERLIN_TZ = ZoneInfo("Europe/Berlin") # Fügen Sie das Projekt-Stammverzeichnis zum Python-Pfad hinzu # Das ist das Verzeichnis, in dem sich das Hook-Skript befindet @@ -60,14 +64,14 @@ def main(): if commit_message: report_content = f"✅ New Commit:\n---\n{commit_message}" - timestamp = datetime.utcnow().strftime('%Y-%m-%d %H:%M') + timestamp = datetime.now(BERLIN_TZ).strftime('%Y-%m-%d %H:%M') notion_blocks = [ { "object": "block", "type": "heading_2", "heading_2": { - "rich_text": [{"type": "text", "text": {"content": f"🤖 Git Commit ({timestamp} UTC)"}}] + "rich_text": [{"type": "text", "text": {"content": f"🤖 Git Commit ({timestamp} Berlin Time)"}}] } }, {