[time.clock.cast.utc]

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

## 30.7 Clocks [[time.clock]](time.clock#cast.utc)

### 30.7.10 time_point conversions [[time.clock.cast]](time.clock.cast#utc)

#### 30.7.10.5 Conversions between utc_clock and other clocks [time.clock.cast.utc]

template<class SourceClock>struct clock_time_conversion<utc_clock, SourceClock> {template<class Duration>auto operator()(const time_point<SourceClock, Duration>& t) const-> decltype(SourceClock::to_utc(t));};

[ð](#lib:operator(),clock_time_conversion)

`template<class Duration>
  auto operator()(const time_point<SourceClock, Duration>& t) const
    -> decltype(SourceClock::to_utc(t));
`

[1](#1)

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

*Constraints*: SourceClock​::​to_utc(t) is well-formed[.](#1.sentence-1)

[2](#2)

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

*Mandates*: SourceClock​::​to_utc(t) returns a utc_time<Duration2> for some type Duration2 ([[time.point.general]](time.point.general "30.6.1 General"))[.](#2.sentence-1)

[3](#3)

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

*Returns*: SourceClock​::​to_utc(t)[.](#3.sentence-1)

template<class DestClock>struct clock_time_conversion<DestClock, utc_clock> {template<class Duration>auto operator()(const utc_time<Duration>& t) const-> decltype(DestClock::from_utc(t));};

[ð](#lib:operator(),clock_time_conversion_)

`template<class Duration>
  auto operator()(const utc_time<Duration>& t) const
    -> decltype(DestClock::from_utc(t));
`

[4](#4)

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

*Constraints*: DestClock​::​from_utc(t) is well-formed[.](#4.sentence-1)

[5](#5)

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

*Mandates*: DestClock​::​from_utc(t) returns a time_point<DestClock, Duration2> for some type Duration2 ([[time.point.general]](time.point.general "30.6.1 General"))[.](#5.sentence-1)

[6](#6)

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

*Returns*: DestClock​::​from_utc(t)[.](#6.sentence-1)
