---
title: "Store future local times as a local time · Agent Wranglers"
url: https://agentwranglers.se/playbook/localization/time-and-time-zones/future-local-times
id: LOC-48
level: Recommended
updated: 2026-10-22
build: a2a6bdfed830
tokens: 996
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Store future local times as a local time and a zone name

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Time and time zones](https://agentwranglers.se/playbook/localization/time-and-time-zones.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-22.

- ID: LOC-48
- Level: Recommended
- Chapter: [Time and time zones](https://agentwranglers.se/playbook/localization/time-and-time-zones.md)
- Rule: Store a future appointment, opening hour or reminder as its local date and time plus an IANA zone name. Compute the UTC instant only when you need it.
- Check: A schema test finds a zone-name column beside every column of future local times. An API test sends `2027-03-02T09:00:00+01:00[Europe/Stockholm]` and reads back the same string.
- How: A UTC instant saved today drifts by an hour when the country changes its rules before the event. Keep past events as UTC instants, and keep the zone database current as [Keep the time zone database current in every runtime](https://agentwranglers.se/playbook/localization/time-and-time-zones/time-zone-database-updates.md) says. In APIs, send the pair as an RFC 9557 timestamp, such as `2027-03-02T09:00:00+01:00[Europe/Stockholm]`, which carries the zone after the offset. In JavaScript use `Temporal.ZonedDateTime` or its polyfill. In Python keep a naive `datetime` and a `ZoneInfo` name. A date with no time, such as a birthday, needs no zone, as [Keep calendar dates as dates](https://agentwranglers.se/playbook/app-ui/dates-and-numbers/calendar-dates.md) says. Test the edges as [Test times at the daylight saving changes](https://agentwranglers.se/playbook/testing/unit-tests/daylight-saving-tests.md) says.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JavaScript example

```js
const meeting = { localTime: '2027-03-02T09:00', timeZone: 'Europe/Stockholm' };
const startsAt = Temporal.PlainDateTime.from(meeting.localTime)
  .toZonedDateTime(meeting.timeZone, { disambiguation: 'compatible' })
  .toInstant();
```

### Python example

```python
from datetime import datetime
from zoneinfo import ZoneInfo

meeting = {"local_time": "2027-03-02T09:00", "time_zone": "Europe/Stockholm"}
starts_at = datetime.fromisoformat(meeting["local_time"]).replace(tzinfo=ZoneInfo(meeting["time_zone"]))
```

## Sources

- [RFC 9557 (Timestamps with Additional Information)](https://www.rfc-editor.org/rfc/rfc9557)
- [IANA Time Zone Database](https://www.iana.org/time-zones)

## Related rules

- APP-13 [Keep calendar dates as dates](https://agentwranglers.se/playbook/app-ui/dates-and-numbers/calendar-dates.md) in Web app interface
- LOC-46 [Keep the time zone database current in every runtime](https://agentwranglers.se/playbook/localization/time-and-time-zones/time-zone-database-updates.md) in Localization
- TST-50 [Test times at the daylight saving changes](https://agentwranglers.se/playbook/testing/unit-tests/daylight-saving-tests.md) in Testing

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/localization/time-and-time-zones/future-local-times">Agent Wranglers localization playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Keep the time zone database current in every runtime](https://agentwranglers.se/playbook/localization/time-and-time-zones/time-zone-database-updates.md)
- Next: [Name the time zone of every day boundary](https://agentwranglers.se/playbook/localization/time-and-time-zones/day-boundary-time-zone.md)
- [Time and time zones](https://agentwranglers.se/playbook/localization/time-and-time-zones.md)
