fix(timetracking): [2f488f42] Behebe Platzhalter, UTC-Zeit und redundante Zeitmessung

This commit is contained in:
2026-01-27 10:24:35 +00:00
parent d022e990e0
commit 2f60da2d8b
2 changed files with 6 additions and 14 deletions

View File

@@ -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.")

View File

@@ -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)"}}]
}
},
{