[time.clock.gps.overview]

# 30 Time library [[time]](./#time)

## 30.7 Clocks [[time.clock]](time.clock#gps.overview)

### 30.7.5 Class gps_clock [[time.clock.gps]](time.clock.gps#overview)

#### 30.7.5.1 Overview [time.clock.gps.overview]

namespace std::chrono {class gps_clock {public:using rep = *a signed arithmetic type*; using period = ratio<*unspecified*, *unspecified*>; using duration = chrono::duration<rep, period>; using time_point = chrono::time_point<gps_clock>; static constexpr bool is_steady = *unspecified*; static time_point now(); template<class Duration>static utc_time<common_type_t<Duration, seconds>> to_utc(const gps_time<Duration>&) noexcept; template<class Duration>static gps_time<common_type_t<Duration, seconds>> from_utc(const utc_time<Duration>&) noexcept; };}

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L3223)

The clock gps_clock measures
seconds since the first Sunday of January, 1980 00:00:00 UTC[.](#1.sentence-1)

Leap seconds are not inserted into GPS[.](#1.sentence-2)

Therefore every time a leap second is inserted into UTC,
UTC shifts another second with respect to GPS[.](#1.sentence-3)

Aside from the offset from 1958y/January/1 to 1980y/January/Sunday[1],
GPS is behind TAI by 19s due to the 10s offset between 1958 and 1970
and the additional 9 leap seconds inserted between 1970 and 1980[.](#1.sentence-4)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L3233)

gps_clock is not a [*Cpp17TrivialClock*](time.clock.req#:Cpp17TrivialClock "30.3 Cpp17Clock requirements [time.clock.req]") unless the implementation can guarantee thatgps_clock​::​now() does not propagate an exception[.](#2.sentence-1)

[*Note [1](#note-1)*:

noexcept(from_utc(utc_clock​::​now())) is false[.](#2.sentence-2)

â *end note*]
