# isValidUtcTimestamp

Industry: Core

## Signature

```ts
isValidUtcTimestamp(value: string): boolean
isValidUtcTimestamp(value: void | {} | null | undefined): boolean
isValidUtcTimestamp(value: unknown): value is string
```

Return true when `value` is a real UTC instant written as `YYYY-MM-DDTHH:MM:SS[.f]Z` and nothing else: a narrower check than `isValidUtc`.

- The shape is one spelling of the RFC 3339 §5.6 `date-time`: a four-digit year, `0000` to `9999` (`date-fullyear = 4DIGIT`), an upper-case `T`, a time with seconds, an optional fraction of one to nine digits after a dot (`time-secfrac = "." 1*DIGIT`; GMT stops at nine because Temporal keeps nanoseconds), and an upper-case `Z` with nothing after it.
- Use it for a string headed for storage, or for a reader that is not Temporal: the shape is plain RFC 3339, and the one `Temporal.Instant.prototype.toString()`, called with no options, writes for years `0000` to `9999`.
- Use `isValidUtc` when Temporal is the only reader. It also accepts a time without seconds, a comma before the fraction, an expanded `±YYYYYY` year and RFC 9557 annotations; all four are false here.
- A subset of `isValidUtc`: every string that is true here is true there. The instant is checked as well as the shape, so a day that does not exist is false.
- False for the other spellings §5.6 allows: a lower-case `t` or `z`, a space for `T` (its NOTE), and a numeric offset, `+00:00` included. `isValidRfc3339DateTime` checks the whole grammar, with the same two GMT limits.
- False for a leap second (`:60`), although §5.6 `time-second` admits it: GMT rejects leap seconds because Temporal would read one as `:59`.
- Not one canonical spelling: `12:00:00Z` and `12:00:00.000Z` are one instant and both are true. A reader may still refuse or round a string that is true here: PostgreSQL has no year `0000` and keeps microseconds. See `toPgMicroseconds` and `precision/`.
- A value that is not a string, a `String` object included, returns `false`. A `true` result narrows an `unknown` value to `string`.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `string` | any value; a string is checked as a UTC timestamp |

## Returns

true when `value` is a real UTC instant in this shape, or false on invalid input

## Examples

```ts
import { isValidUtcTimestamp } from "@northguild/gmt/utc/validate";

isValidUtcTimestamp("2026-10-06T12:00:00Z") // true
```

## Source

[utc/validate/isValidUtcTimestamp.ts](https://github.com/northguild/gmt/blob/main/packages/gmt/src/utc/validate/isValidUtcTimestamp.ts)
