Skip to content

Commit 9911947

Browse files
committed
Fix iso time
1 parent 89bd994 commit 9911947

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/conftest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,10 @@ def func(arg):
185185
elif unit == "y":
186186
ret += relativedelta(years=num)
187187
if iso:
188-
return ret.isoformat(timespec="seconds")
188+
# Return ISO 8601 formatted string with Z timezone indicator
189+
# Example: 2025-04-17T03:17:07.923Z
190+
from datetime import timezone
191+
return ret.astimezone(timezone.utc).isoformat(timespec="milliseconds").replace("+00:00", "Z")
189192
return int(ret.timestamp())
190193
return ""
191194

0 commit comments

Comments
 (0)