std::chrono...ock::to_sys(3)
β¨ NAME β¨
std::chrono::utc_clock::to_sys β literally std::chrono::utc_clock::to_sys, that's the whole name, no cap. We're in the C++ Standard Libary manual, bestie, and this page is the main character π
πΈ Synopsis πΈ
template< class Duration >
static std::chrono::sys_time<std::common_type_t<Duration,
(since C++20)
std::chrono::seconds>>
to_sys( const std::chrono::utc_time<Duration>& t );
Okay so to_sys converts a utc_time t to a sys_time representing the same point in time β if possible π. It's giving "same exact moment, different clock system."
Now the leap-second plot twist: if t represents a time point during a leap second insertion, the last representable value of sys_time prior to the insertion of the leap second is returned. In all other cases, utc_clock::from_sys(utc_clock::to_sys(t)) == t. periodt β¨
π Return value π
A sys_time representing the same point in time as t β or, if t represents a time point during a leap second insertion, the last representable value prior to the insertion of the leap second. That's the whole return vibe, no cap π«Ά
π¦ See also π¦
from_sysβ convertssys_timetoutc_time; it's[static](public static member function).clock_castβ converts time points of one clock to another;(C++20)(function template).
that's the tea from http://cppreference.com, version/date 2024.06.10, page label std::chrono...ock::to_sys(3). bye bestie, go convert some clocks ππ¦β¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms