# gnssToUtc

Industry: GNSS

## Signature

```ts
gnssToUtc(system: GnssSystem, value: string): string
```

Convert a satellite system's time-scale string to a UTC instant string.

- Reads `YYYY-MM-DDTHH:MM:SS[.fraction] <token>` with the system's RINEX token. Any other token returns "".
- A continuous scale has no second 60; `GLO` has one exactly when UTC does.
- During an inserted leap second the result is `…T23:59:60Z`. Only the `timescale/`, `gnss/` and `finance/` functions read that string back; other GMT functions reject a second of 60.
- "" before the system's epoch and on invalid input.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `system` | `GnssSystem` | satellite time scale: "GPS", "GAL", "BDT", "QZS", "GLO" or "IRN" |
| `value` | `string` | the system's time-scale string |

## Returns

ISO 8601 UTC instant string (`Z`), or "" on invalid input or before the system's epoch

## Related types

- [`GnssSystem`](/gmt/reference/types/GnssSystem/)

## Examples

```ts
import { gnssToUtc } from "@northguild/gmt/gnss/convert";

gnssToUtc("GPS", "2017-01-01T00:00:17 GPS") // "2016-12-31T23:59:60Z"
```

## Source

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