# Date Math City Time Zone Lookup

> Date Math City Time Zone Lookup is a paid API for AI agents from date-math.datemath.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-14).

Looks up the IANA time zone and current local time for up to 10 cities by name, returning timezone, UTC offset, weekday, and population data.

## Facts

- Endpoint: POST https://date-math.datemath.workers.dev/v1/city?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/date-math-city-time-zone-lookup-cf883089
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IZ1LGKymDGyfnqIDmZaYv

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability date-math-city-time-zone-lookup-cf883089 -d '<json body>'
```

Example prompt: What's the IANA timezone and current local time for Cebu in the Philippines and São Paulo in Brazil?

## When to prefer this

Use this endpoint when you need to resolve one or more city names to their IANA timezone identifiers and/or local times in a single call. It supports batch lookup of up to 10 cities, handles disambiguation via country code, and covers 7,000+ cities globally. Prefer this over manual timezone mapping or generic geocoding APIs when you need structured timezone metadata including UTC offset, weekday, and population without full geocoordinate lookup.

## Known failure modes

- City name not found in database (found: false with empty alternatives)
- Ambiguous city name without country code returns multiple alternatives rather than a single best match
- Exceeding 10 cities in a single request returns a validation error
- Invalid country code format (not 2-letter ISO alpha-2) causes a schema validation error
- Very small or unofficial city names may not be in the 7,000+ city database

## How this service works

Date Math: Find the time zone and current local time in up to 10 cities by name ("Cebu", "São Paulo", "Springfield" + country). 7,000+ cities. Use for "what time is it in" questions and to get the IANA zone the other tools need.

## Output

Returns a JSON object with the lookup timestamp and an array of results, one per queried city. Each result includes the IANA timezone identifier (e.g. 'Asia/Manila'), current local time in ISO 8601 format with offset, UTC offset string, weekday name, region, country code, population, match quality (exact/fuzzy), and any alternative city matches if the name was ambiguous.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "at": {
   "type": "string",
   "description": "ISO 8601 instant to show local time for; default now"
  },
  "city": {
   "type": "string",
   "example": "Cebu"
  },
  "cities": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "maxItems": 10,
   "minItems": 1
  },
  "country": {
   "type": "string",
   "example": "US",
   "pattern": "^[A-Za-z]{2}$",
   "description": "ISO 3166-1 alpha-2 country code (207 countries); its public holidays (2000–2050) are excluded from business days"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "at": "2026-11-10T13:23:34.870Z",
  "results": [
   {
    "best": {
     "name": "Cebu",
     "match": "exact",
     "region": "Cebu",
     "country": "PH",
     "weekday": "Tuesday",
     "timezone": "Asia/Manila",
     "local_time": "2026-11-10T21:23:34+08:00",
     "population": 806817,
     "utc_offset": "+08:00"
    },
    "found": true,
    "query": "Cebu",
    "alternatives": []
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/date-math-city-time-zone-lookup-cf883089/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from date-math.datemath.workers.dev](https://www.zero.xyz/host/date-math.datemath.workers.dev/llms.txt)
