27 Time library [time]

27.6 Class template time_­point [time.point]

27.6.7 Conversions [time.point.cast]

template<class ToDuration, class Clock, class Duration> constexpr time_point<Clock, ToDuration> time_point_cast(const time_point<Clock, Duration>& t);
Constraints: ToDuration is a specialization of duration.
Returns:
time_point<Clock, ToDuration>(duration_cast<ToDuration>(t.time_since_epoch()))
template<class ToDuration, class Clock, class Duration> constexpr time_point<Clock, ToDuration> floor(const time_point<Clock, Duration>& tp);
Constraints: ToDuration is a specialization of duration.
Returns: time_­point<Clock, ToDuration>(floor<ToDuration>(tp.time_­since_­epoch())).
template<class ToDuration, class Clock, class Duration> constexpr time_point<Clock, ToDuration> ceil(const time_point<Clock, Duration>& tp);
Constraints: ToDuration is a specialization of duration.
Returns: time_­point<Clock, ToDuration>(ceil<ToDuration>(tp.time_­since_­epoch())).
template<class ToDuration, class Clock, class Duration> constexpr time_point<Clock, ToDuration> round(const time_point<Clock, Duration>& tp);
Constraints: ToDuration is a specialization of duration, and treat_­as_­floating_­point_­v<typename ToDuration​::​rep> is false.
Returns: time_­point<Clock, ToDuration>(round<ToDuration>(tp.time_­since_­epoch())).