27 Time library [time]

27.7 Clocks [time.clock]

27.7.9 time_­point conversions [time.clock.cast]

27.7.9.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));
};
template<class Duration> auto operator()(const time_point<SourceClock, Duration>& t) const -> decltype(SourceClock::to_utc(t));
Remarks: This function does not participate in overload resolution unless SourceClock​::​to_­utc(t) is well-formed.
If SourceClock​::​to_­utc(t) does not return utc_­time<Duration>, where Duration is a valid chrono​::​duration specialization, the program is ill-formed.
Returns: SourceClock​::​to_­utc(t).
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));
};
template<class Duration> auto operator()(const utc_time<Duration>& t) const -> decltype(DestClock::from_utc(t));
Remarks: This function does not participate in overload resolution unless DestClock​::​from_­utc(t) is well-formed.
If DestClock​::​from_­utc(t) does not return time_­point<DestClock, Duration>, where Duration is a valid chrono​::​duration specialization, the program is ill-formed.
Returns: DestClock​::​from_­utc(t).