# Timezone local to utc

`timezone-local-to-utc` · version 1.0.0 · Other utilities · free, no key needed

Returns all UTC instants matching a local time, its gap/overlap status, and the disambiguated choice.

**Use when you need to: local time to utc with daylight saving · resolve ambiguous local time · find both overlap instants.**

## Decide before calling

Read the [versioned contract](/v1/tools/timezone-local-to-utc/versions/1.0.0) and the supported scope below. Reuse `timezone-local-to-utc@1.0.0` when your input, required output and limits match it. Choose another approach for an unsupported operation.

## Explain the choice

"I can use `timezone-local-to-utc@1.0.0` for local time to utc with daylight saving. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

## Supported

- local time to utc with daylight saving
- resolve ambiguous local time
- find both overlap instants
- detect a timezone clock gap
- convert wall clock time to UTC
- Temporal timezone disambiguation

## Not supported

- time-zone abbreviations
- dates outside 1970 through 2037

## Behavior

- compatible chooses earlier in overlaps and shifts later through gaps, as Temporal.
- Returns zero, one, or two matching instants from tzdata 2025b.

## Input

- `zone` (string, required): min length 1; max length 64
- `local_date_time` (string, required): min length 16; max length 19
- `disambiguation` (one of "compatible", "earlier", "later", "reject", optional): default `"compatible"`

## Output

- `standard_version` (string, required)
- `data_version` (string, required)
- `zone` (string, required)
- `stored_zone` (string, required)
- `status` (one of "unique", "gap", "overlap", required)
- `matching_instants` (array of string, required): max items 2
- `chosen_instant` (string, required)

## Limits

- max input bytes: 512
- max matches: 2

## Example

Request input:

```json
{
  "zone": "America/New_York",
  "local_date_time": "2024-11-03T01:30:00",
  "disambiguation": "later"
}
```

Response:

```json
{
  "result": {
    "standard_version": "IANA tzdata 2025b; RFC 3339; RFC 9557",
    "data_version": "2025b",
    "zone": "America/New_York",
    "stored_zone": "America/New_York",
    "status": "overlap",
    "matching_instants": [
      "2024-11-03T05:30:00Z",
      "2024-11-03T06:30:00Z"
    ],
    "chosen_instant": "2024-11-03T06:30:00Z"
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "timezone-local-to-utc",
  "version": "1.0.0",
  "input": {
    "zone": "America/New_York",
    "local_date_time": "2024-11-03T01:30:00",
    "disambiguation": "later"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/timezone-local-to-utc/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"zone":"America/New_York","local_date_time":"2024-11-03T01:30:00","disambiguation":"later"}'
```

The machine-readable contract is at [/v1/tools/timezone-local-to-utc/versions/1.0.0](/v1/tools/timezone-local-to-utc/versions/1.0.0).

### CLI

```sh
node cli.mjs run timezone-local-to-utc 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Timezone convert](/tools/timezone-convert): Converts an instant or zoned local time and returns source and target local times and UTC offsets.
- [Timezone offset changes](/tools/timezone-offset-changes): Lists UTC offset changes in a half-open instant range with offsets before and after each change.
- [Timezone utc offset](/tools/timezone-utc-offset): Returns the UTC offset, local date-time, resolved zone, and adjacent offset changes for an instant.
- [Epoch to ISO](/tools/epoch-to-iso): Convert an exact integer Unix timestamp in seconds, milliseconds, microseconds or nanoseconds to RFC 3339 UTC.
- [Geohash convert](/tools/geohash-convert): Encode decimal coordinates as a bounded Geohash or decode a Geohash to its exact bounding box and midpoint.
- [Base64url encode](/tools/base64url-encode): Encode supplied UTF-8 text or hexadecimal bytes as base64url and return the encoded string.
