---
title: "Name the time zone of every day boundary · Agent Wranglers"
url: https://agentwranglers.se/playbook/localization/time-and-time-zones/day-boundary-time-zone
id: LOC-49
level: Recommended
updated: 2026-10-22
build: a2a6bdfed830
tokens: 713
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Name the time zone of every day boundary

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-49
- Level: Recommended
- Chapter: [Time and time zones](https://agentwranglers.se/playbook/localization/time-and-time-zones.md)
- Rule: Every daily limit, billing period, report day and "today" in the code takes its time zone from configuration or from the account. None takes it from the server clock.
- Check: A search finds no `date.today()`, `setHours(0)` or start-of-day call without a zone argument. A unit test resets a daily cap for an account in `Australia/Sydney` at local midnight.
- How: A daily cap that resets at midnight UTC resets at 10:00 or 11:00 in Sydney. An invoice dated by server time can land in the wrong month for a customer far from the server. Use the account's zone for anything a customer sees, and one named zone for internal totals. Compute each boundary from the zone name, never by adding 24 hours, since a day lasts 23 or 25 hours at a daylight saving change. Caps themselves follow [Let customers cap their spend](https://agentwranglers.se/playbook/pricing/spend-caps-and-alerts/customer-spend-cap.md).

## 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
export const startOfToday = timeZone =>
  Temporal.Now.zonedDateTimeISO(timeZone).startOfDay().toInstant();
```

### Python example

```python
from datetime import datetime, time
from zoneinfo import ZoneInfo

def start_of_today(time_zone: str) -> datetime:
    zone = ZoneInfo(time_zone)
    return datetime.combine(datetime.now(zone).date(), time(0), tzinfo=zone)
```

## Related rules

- PRC-7 [Let customers cap their spend](https://agentwranglers.se/playbook/pricing/spend-caps-and-alerts/customer-spend-cap.md) in Pricing, plans and entitlements

**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/day-boundary-time-zone">Agent Wranglers localization playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Store future local times as a local time and a zone name](https://agentwranglers.se/playbook/localization/time-and-time-zones/future-local-times.md)
- [Time and time zones](https://agentwranglers.se/playbook/localization/time-and-time-zones.md)
