fix(timetracking): [2f488f42] Passe Zeiterfassung an Berlin-Zeitzone an
This commit is contained in:
@@ -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)"}}]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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)"}}]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user