---
title: "Send dates as RFC 3339 with a time zone · Agent Wranglers"
url: https://agentwranglers.se/playbook/api-design/requests-and-responses/dates-and-times
updated: 2026-10-20
licence: "All rights reserved"
---

# Send dates as RFC 3339 with a time zone

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Required
- Chapter: [Requests and responses](https://agentwranglers.se/playbook/api-design/requests-and-responses)
- Rule: Write every moment in time as an RFC 3339 string with a zone or offset. Write a calendar date with no time as `YYYY-MM-DD`.
- How: Store and send instants in UTC, such as `2026-11-03T09:00:00Z`. Send the user's IANA time zone as a separate field when local time matters, such as `Europe/Stockholm`. Never send local times without an offset, or numbers that might be seconds or milliseconds.
- Check: Turn on format checks in the validator. A JSON Schema with `format: date-time` validates every response in the contract tests, and no timestamp lacks `Z` or an offset.

Example:

```json
{ "deliveredAt": "2026-11-03T09:00:00Z", "deliveryDate": "2026-11-03", "timeZone": "Europe/Stockholm" }
```

```js
const deliveredAt = new Date().toISOString()
```

```python
from datetime import datetime, timezone

delivered_at = datetime.now(timezone.utc).isoformat().replace("+00:00", "Z")
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers api design playbook: https://agentwranglers.se/playbook/api-design/requests-and-responses/dates-and-times`.

- Previous: [Use JSON with one naming style](https://agentwranglers.se/playbook/api-design/requests-and-responses/json-conventions)
- Next: [Send money as an integer with its currency](https://agentwranglers.se/playbook/api-design/requests-and-responses/money)
- [Requests and responses](https://agentwranglers.se/playbook/api-design/requests-and-responses)
