# Time & Timezone API
> Current local date and time for any IANA timezone or geographic coordinate, with UTC offset and daylight-saving (DST) state, plus the full list of 590+ timezones. Resolve a timezone from lat/lon, build world clocks, schedule across regions or stamp events in the right local time.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/time-api/..."
```

## Pricing
- **Free** (Free) — 10,000 calls/Mo, 10 req/s
- **Basic** ($5/Mo) — 100,000 calls/Mo, 25 req/s
- **Pro** ($19/Mo) — 500,000 calls/Mo, 50 req/s
- **Mega** ($49/Mo) — 2,500,000 calls/Mo, 80 req/s

## Endpoints

### Time

#### `GET /v1/current` — Current local time

**Parameters:**
- `timezone` (query, optional, string) — IANA timezone name (or use lat+lon) Example: `Europe/Berlin`
- `lat` (query, optional, string) — Latitude (with lon)
- `lon` (query, optional, string) — Longitude (with lat)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/time-api/v1/current?timezone=Europe%2FBerlin"
```

**Response:**
```json
{
    "data": {
        "day": 30,
        "date": "05/30/2026",
        "hour": 5,
        "time": "05:14",
        "year": 2026,
        "month": 5,
        "minute": 14,
        "seconds": 10,
        "datetime": "2026-05-30T05:14:10.1666383",
        "timezone": "Europe/Berlin",
        "dst_active": true,
        "day_of_week": "Saturday"
    },
    "meta": {
        "timestamp": "2026-05-30T03:14:10.891Z",
        "request_id": "52860066-b913-4196-a810-713882a078cc"
    },
    "status": "ok",
    "message": "Time retrieved successfully",
    "success": true
}
```

#### `GET /v1/zone` — Timezone details (offset, DST)

**Parameters:**
- `timezone` (query, optional, string) — IANA timezone name (or use lat+lon) Example: `Asia/Tokyo`
- `lat` (query, optional, string) — Latitude (with lon)
- `lon` (query, optional, string) — Longitude (with lat)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/time-api/v1/zone?timezone=Asia%2FTokyo"
```

**Response:**
```json
{
    "data": {
        "timezone": "Asia/Tokyo",
        "dst_active": false,
        "current_local_time": "2026-05-30T12:14:11.1079865",
        "has_daylight_saving": false,
        "current_utc_offset_seconds": 32400,
        "standard_utc_offset_seconds": 32400
    },
    "meta": {
        "timestamp": "2026-05-30T03:14:11.349Z",
        "request_id": "f4da9fe8-cbee-4336-a73f-b1a12eb490c5"
    },
    "status": "ok",
    "message": "Timezone retrieved successfully",
    "success": true
}
```

#### `GET /v1/zones` — List all IANA timezones

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/time-api/v1/zones"
```

**Response:**
```json
{
    "data": {
        "count": 597,
        "timezones": [
            "Africa/Abidjan",
            "Africa/Accra",
            "Africa/Addis_Ababa",
            "Africa/Algiers",
            "Africa/Asmara",
            "Africa/Asmera",
            "Africa/Bamako",
            "Africa/Bangui",
            "Africa/Banjul",
            "Africa/Bissau",
            "Africa/Blantyre",
            "Africa/Brazzaville",
            "Africa/Bujumbura",
            "Africa/Cairo",
            "Africa/Casablanca",
            "Africa/Ceuta",
            "Africa/Conakry",
            "Africa/Dakar",
            "Africa/Dar_es_Salaam",
            "Africa/Djibouti",
            "Africa/Douala",
            "Africa/El_Aaiun",
            "Africa/Freetown",
            "Africa/Gaborone",
            "Africa/Harare",
            "Africa/Johannesburg",
            "Africa/Juba",
            "Africa/Kampala",
            "Africa/Khartoum",
            "Africa/Kigali",
            "Africa/Kinshasa",
            "Africa/Lagos",
            "Africa/Libreville",
            "Africa/Lome",
            "Africa/Luanda",
            "Africa/Lubumbashi",
            "Africa/Lusaka",
            "Africa/Malabo",
            "Africa/Maputo",
            "Africa/Maseru",
            "Africa/Mbabane",
            "Africa/Mogadishu",
            "Africa/Monrovia",
            "Africa/Nairobi",
            "Africa/Ndjamena",
            "Africa/Niamey",
            "Africa/Nouakchott",
            "Afr
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/time-api
OpenAPI spec: https://www.oanor.com/api/time-api/openapi.json
