Pin the UTC offset on the time a flow version carries

Every datetime the API emits for versions (flow summaries' updated_at,
runs' created/started/finished with flow_version) is already ISO 8601
with Z or +00:00. A test holds it and the API docs say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
2026-10-15 10:57:41 +02:00
co-authored by Claude Opus 5.5
parent 1c6393766a
commit 7a56818213
2 changed files with 7 additions and 1 deletions
+5
View File
@@ -62,6 +62,11 @@ def test_save_then_read_flow(
assert body["definition"]["title"] == "Demo"
assert {node["id"] for node in body["definition"]["nodes"]} == {"sensor", "logger"}
# The time beside a version carries its offset, so no client guesses a zone.
listed = client.get(f"{PREFIX}/", headers=superuser_token_headers).json()["data"]
summary = next(flow for flow in listed if flow["name"] == "demo")
assert datetime.fromisoformat(summary["updated_at"]).tzinfo is not None
def test_name_mismatch_is_rejected(
client: TestClient, superuser_token_headers: dict[str, str]
+2 -1
View File
@@ -12,7 +12,8 @@ export FLUKSIO=http://127.0.0.1:8000/api/v1
Use the port printed by `fluksio serve`. For Docker, use
`http://api.localhost/api/v1`, `http://<host-ip>:8080/api/v1` on a LAN stack,
or `https://api.<your-domain>/api/v1` for a deployment.
All paths below are relative to this base.
All paths below are relative to this base. Timestamps in responses are
ISO 8601 and always carry their UTC offset.
## Authenticating