std::chrono...ock::to_utc(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

okay so welcome to std::chrono...ock::to_utc(3) from the C++ Standard Libary β€” manual name folded in near the top like a little name tag, no cap. ✨ This page is about std::chrono::gps_clock::to_utc, and it's giving β€œconvert GPS time to UTC time” energy. πŸ’…

🌸 NAME 🌸

std::chrono::gps_clock::to_utc - std::chrono::gps_clock::to_utc

πŸ›°οΈ Synopsis πŸ›°οΈ

          template< class Duration >

          static std::chrono::utc_time<std::common_type_t<Duration,
       (since C++20)
          std::chrono::seconds>>

              to_utc( const std::chrono::gps_time<Duration>& t ) noexcept;

This function converts the gps_time t to a utc_time representing the same point in time. Same moment, different clock aesthetic. ⏰✨

πŸ’– Return value πŸ’–

Returns a std::chrono::utc_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 315964809s β€” and yes, 315964809 is literally the number of seconds between the epochs of the two clocks: 1980-01-06 00:00:00 UTC for gps_clock and 1970-01-01 00:00:00 UTC for utc_clock. πŸ•°οΈπŸ”₯

😭 Example 😭

This section is incomplete Reason: no example

πŸ‘€ See also πŸ‘€

  • from_utc β€” converts a utc_time to gps_time
    • [static] (public static member function)
  • clock_cast β€” convert time points of one clock to another
    • (C++20) (function template)

🏷️ Category: 🏷️

  • Todo no example

bye bestie 🫢 β€” source/version: http://cppreference.com, date: 2024.06.10.

πŸ“¦ where this page comes from