# Timezone

> **You are on:** `https://beta-api.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API |
> |---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com |
> | Beta | beta.paywithlocus.com | beta-api.paywithlocus.com |
> | Stage | stage.paywithlocus.com | stage-api.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Current time and timezone conversion for any location.

**Category:** Data | **Website:** [www.abstractapi.com/api/time-date-timezone-api](https://www.abstractapi.com/api/time-date-timezone-api) | **Docs:** [docs.abstractapi.com/timezone](https://docs.abstractapi.com/timezone)

## Access Methods

| Method | Base URL | Auth |
|--------|----------|------|
| **MPP (Tempo)** | `https://abstract-timezone.mpp.paywithlocus.com/abstract-timezone/` | HTTP 402 auto-payment |
| **Wrapped API** | `https://beta-api.paywithlocus.com/api/wrapped/abstract-timezone/` | `Authorization: Bearer <LOCUS_API_KEY>` |

**OpenAPI discovery:** `GET https://abstract-timezone.mpp.paywithlocus.com/openapi.json`

## Endpoints

### Current Time

Get the current time for a location.

**Estimated cost:** $0.006

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `location` | string | Yes | Location name or coordinates |

```bash
curl -X POST https://abstract-timezone.mpp.paywithlocus.com/abstract-timezone/current-time \
  -H "Content-Type: application/json" \
  -d '{"location":"<string>"}'
```

### Convert Time

Convert a datetime between two timezones.

**Estimated cost:** $0.006

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `base_location` | string | Yes | Source location |
| `target_location` | string | Yes | Target location |
| `base_datetime` | string | No | Datetime to convert |

```bash
curl -X POST https://abstract-timezone.mpp.paywithlocus.com/abstract-timezone/convert-time \
  -H "Content-Type: application/json" \
  -d '{"base_location":"<string>","target_location":"<string>","base_datetime":"<string>"}'
```
