Compare commits
2 Commits
5e0186c534
...
1dd4c6b6da
| Author | SHA1 | Date | |
|---|---|---|---|
| 1dd4c6b6da | |||
| daa3637ef6 |
@@ -1 +1 @@
|
||||
{"task_id": "33e88f42-8544-80a2-8cee-e0b11287c523", "token": "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", "readme_path": "readme.md", "session_start_time": "2026-04-10T21:51:09.122501"}
|
||||
{"task_id": "32788f42-8544-80e1-a13a-c26114cf9b34", "token": "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", "readme_path": "readme.md", "session_start_time": "2026-04-12T19:57:10.454150"}
|
||||
@@ -51,9 +51,9 @@ def get_calendly_events_raw(api_token: str, start_time: str = None, end_time: st
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
||||
# Defaults: 2024 to +2 years (broad range to ensure we capture all relevant upcoming)
|
||||
# Defaults: current time to +2 years
|
||||
if not start_time:
|
||||
start_time = "2024-01-01T00:00:00Z"
|
||||
start_time = datetime.datetime.utcnow().isoformat() + "Z"
|
||||
if not end_time:
|
||||
end_time = (datetime.datetime.utcnow() + datetime.timedelta(days=730)).isoformat() + "Z"
|
||||
|
||||
@@ -133,11 +133,22 @@ def get_calendly_events(api_token: str, start_time: str = None, end_time: str =
|
||||
raw_data = get_calendly_events_raw(api_token, start_time, end_time, event_type_name)
|
||||
formatted_data = []
|
||||
|
||||
# Calculate midnight today in Berlin time for filtering
|
||||
now_berlin = datetime.datetime.now(ZoneInfo("Europe/Berlin"))
|
||||
midnight_today = now_berlin.replace(hour=0, minute=0, second=0, microsecond=0)
|
||||
|
||||
for item in raw_data:
|
||||
# Parse start time from UTC
|
||||
start_dt = datetime.datetime.fromisoformat(item['start_time'].replace('Z', '+00:00'))
|
||||
# Convert to Europe/Berlin (CET/CEST)
|
||||
start_dt = start_dt.astimezone(ZoneInfo("Europe/Berlin"))
|
||||
|
||||
# Filter out past events
|
||||
if start_dt < midnight_today:
|
||||
logger.debug(f"Skipping past event: {item['invitee_name']} at {start_dt}")
|
||||
continue
|
||||
|
||||
logger.info(f"Processing event: {item['invitee_name']} at {start_dt}")
|
||||
# Format as HH:MM
|
||||
time_str = start_dt.strftime('%H:%M')
|
||||
|
||||
|
||||
@@ -268,3 +268,12 @@ Investierte Zeit in dieser Session: 01:12
|
||||
Arbeitszusammenfassung:
|
||||
Keine Zusammenfassung angegeben.
|
||||
```
|
||||
|
||||
|
||||
## 🤖 Status-Update (2026-04-12 21:57 Berlin Time)
|
||||
```yaml
|
||||
Investierte Zeit in dieser Session: 00:23
|
||||
|
||||
Arbeitszusammenfassung:
|
||||
Bugfix in der QR-Karten-Generierung: Vergangene Calendly-Termine werden nun sowohl beim Abruf (Startzeit auf 'jetzt' gesetzt) als auch bei der Verarbeitung (Filterung auf Termine ab heute 00:00 Uhr Berlin Zeit) korrekt ausgeschlossen. Dies behebt die Anzeige von Altdaten aus dem Vorjahr.
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user