fix: use Z suffix for Granola API created_after date format

Granola API rejects +00:00 timezone offset and bare ISO timestamps.
Use strftime with explicit Z suffix which the API accepts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jon Saad-Falcon
2026-03-29 14:35:17 -07:00
co-authored by Claude Opus 4.6
parent 91205fda2b
commit 90ef8338d6
+5 -5
View File
@@ -268,13 +268,13 @@ class GranolaConnector(BaseConnector):
if not api_key:
return
# Convert since to ISO string if provided
# Convert since to ISO string if provided.
# Granola API requires ISO 8601 with Z suffix (not +00:00).
created_after: Optional[str] = None
if since is not None:
# Ensure UTC-aware for serialisation
if since.tzinfo is None:
since = since.replace(tzinfo=timezone.utc)
created_after = since.isoformat()
if since.tzinfo is not None:
since = since.replace(tzinfo=None)
created_after = since.strftime("%Y-%m-%dT%H:%M:%SZ")
page_cursor: Optional[str] = cursor
synced = 0