# etaAtZone

Industry: Transport

## Signature

```ts
etaAtZone(arrivalUtc: string, targetZone: string): string
```

Render an arrival instant as local time in the zone where it will be read.

- Schedules are computed in UTC and displayed where the cargo lands. The zone is the caller's fact: GMT does not resolve a port, airport, terminal or station code to a timezone, and takes an IANA identifier instead.
- `arrivalUtc` is any instant `isValidInstant` accepts — `Z` or an offset, with no annotation of any kind. `targetZone` is the zone the result is rendered in.
- **No disambiguation arises.** The input is a moment, and a moment has exactly one wall time in any zone, so the `disambiguation` vocabulary of `resolveLocal` does not apply here. On a fall-back night two moments an hour apart print the same wall time with different offsets, and the offset in the result is what tells them apart; on a spring-forward night the skipped hour simply never appears. That is also why the result carries its offset and zone rather than a bare wall time.
- Returns a zoned ISO 8601 string, `Temporal.ZonedDateTime.prototype.toString()`'s form: wall time, offset, bracketed zone.
- `targetZone` is whatever `isValidTimeZone` accepts, which is what Temporal accepts: an IANA identifier, or a fixed offset such as `"+09:00"`, which renders with the offset as its zone. A fixed offset is a legitimate rendering choice for a ship's log; it is not a place.
- Returns `""` when the instant or the zone is invalid.
- An offset with seconds (`-00:44:30`) returns `""`. A written zone cannot carry seconds (RFC 9557 §4.1), so the result could not name it. Pass the IANA name, or call `fromOffsetInstant({ instant, offset })` for the local time with its full offset and no bracket.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `arrivalUtc` | `string` | ISO 8601 instant string of the arrival |
| `targetZone` | `string` | IANA name or a UTC offset to the minute (what `isValidTimeZone` accepts), for the place the arrival is read in |

## Returns

zoned ISO 8601 string of the local arrival, or "" on invalid input

## Examples

```ts
import { etaAtZone } from "@northguild/gmt/transport/convert";

etaAtZone("2024-06-15T12:30:00Z", "Asia/Tokyo") // "2024-06-15T21:30:00+09:00[Asia/Tokyo]"
```

## Source

[transport/convert/etaAtZone.ts](https://github.com/northguild/gmt/blob/main/packages/gmt/src/transport/convert/etaAtZone.ts)
