diff --git a/dev_session.py b/dev_session.py index 323aab33..25b3ad0a 100644 --- a/dev_session.py +++ b/dev_session.py @@ -660,13 +660,13 @@ def report_status_to_notion( report_content = "\n".join(report_lines) # Notion Blöcke für die API erstellen - timestamp = datetime.now().strftime('%Y-%m-%d %H:%M') + timestamp = datetime.utcnow().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})"}}] + "rich_text": [{"type": "text", "text": {"content": f"🤖 Status-Update ({timestamp} UTC)"}}] } }, { @@ -692,7 +692,7 @@ def report_status_to_notion( # Commit-Nachricht erstellen commit_subject = actual_summary.splitlines()[0] if actual_summary else "Notion Status Update" - commit_message = f"[{task_id.split('-')[0]}] {commit_subject}\n\n{{actual_summary}}" + commit_message = f"[{task_id.split('-')[0]}] {commit_subject}\n\n{actual_summary}" subprocess.run(["git", "commit", "-m", commit_message], check=True) print("✅ Git commit erfolgreich.") diff --git a/notion_commit_hook.py b/notion_commit_hook.py index b5afa22a..5ff4e0f0 100644 --- a/notion_commit_hook.py +++ b/notion_commit_hook.py @@ -59,23 +59,15 @@ def main(): commit_message = get_last_commit_message() if commit_message: - time_comment = "" - if session_start_time_str: - session_start_time = datetime.fromisoformat(session_start_time_str) - elapsed_time = datetime.now() - session_start_time - elapsed_hours = elapsed_time.total_seconds() / 3600 - elapsed_hhmm = decimal_hours_to_hhmm(elapsed_hours) - time_comment = f"⏱️ Arbeitszeit in dieser Session: {elapsed_hhmm}\n" - - report_content = f"✅ New Commit:\n{time_comment}---\n{commit_message}" - timestamp = datetime.now().strftime('%Y-%m-%d %H:%M') + report_content = f"✅ New Commit:\n---\n{commit_message}" + timestamp = datetime.utcnow().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})"}}] + "rich_text": [{"type": "text", "text": {"content": f"🤖 Git Commit ({timestamp} UTC)"}}] } }, {