fix: treat naive datetime query params as UTC (#752)
## Summary `HttpClientBase._parse_params` called `.astimezone(UTC)` directly on incoming `datetime` values. Per Python's stdlib, a naive datetime is presumed to represent time in the system's local timezone, so on a non-UTC host the value was shifted by the host's offset and then serialized with a `Z` suffix — a wire format that *looks* like UTC but isn't. This silently corrupted timestamp filters such as `started_before`/`started_after` on `runs().list()` whenever a caller passed a naive datetime. The fix attaches `UTC` to the value when `tzinfo` is missing, so naive datetimes round-trip as UTC instead of being relocalized. Added a unit test that pins `TZ=Asia/Karachi` with `time.tzset()` to reproduce the bug deterministically on Unix CI (skipped on Windows, where `time.tzset` is unavailable). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
V
Vlada Dusek committed
9ab096a7453080a3079c7459079f99a30bd6a7cb
Parent: 5a32f25
Committed by GitHub <noreply@github.com>
on 4/22/2026, 8:46:00 AM