std::chrono...k::from_utc(3)
π std::chrono...k::from_utc(3) β C++ Standard Libary
okay so bestie, welcome to the C++ Standard Libary manual π today's main character is std::chrono::tai_clock::from_utc, and she is literally here to clock-convert your UTC vibe into TAI time. no cap. π°οΈβ¨
πΈ NAME πΈ
std::chrono::tai_clock::from_utcβ yep, that's the whole name:std::chrono::tai_clock::from_utc. iconic, repetitive, we love her. π
π¦ Synopsis π¦
here's the full signature, copied with love and zero edits:
template< class Duration >
static std::chrono::tai_time<std::common_type_t<Duration,
(since C++20)
std::chrono::seconds>>
from_utc( const std::chrono::utc_time<Duration>& ) noexcept;
the way this function just converts the utc_time value named t into a tai_time representing the exact same point in time? obsessed ππ₯
π Return value π
you get back a std::chrono::tai_time representing the same point in time as t, computed as if by constructing a value of the return type from t.time_since_epoch() and adding 378691210s. and yes, 378691210 is the number of seconds between the epochs of the two clocks: 1958-01-01 00:00:00 TAI and 1970-01-01 00:00:00 UTC. epoch math moment π§β¨
π See also π
to_utcβ convertstai_timetoutc_time;[static](public static member function).clock_castβ convert time points of one clock to another;(C++20)(function template).
source/version/date tea β: this page is from http://cppreference.com, version/date 2024.06.10, and the header/footer title is std::chrono...k::from_utc(3). bye bestie, go convert those 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