Skip to content

Commit c5a5451

Browse files
committed
fix(cloud): use Z suffix in ISO timestamp for Zod compatibility
datetime.isoformat() produces "+00:00" offset which is rejected by z.string().datetime() — use strftime to always emit the Z suffix.
1 parent 443b480 commit c5a5451

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎apiforgepy/cloud_transport.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def write(self, rows: list[dict]) -> None:
3333
"service": self._service,
3434
"env": r["env"],
3535
"release": r.get("release_tag"),
36-
"time": datetime.fromtimestamp(r["bucket_ts"], tz=timezone.utc).isoformat(),
36+
"time": datetime.fromtimestamp(r["bucket_ts"], tz=timezone.utc).strftime('%Y-%m-%dT%H:%M:%S.000Z'),
3737
"calls_total": r["total_calls"],
3838
"calls_2xx": r["status_2xx"],
3939
"calls_4xx": r["status_4xx"],

0 commit comments

Comments
 (0)