std::chrono::local_info(3)
okay bestie, welcome to the std::chrono::local_info(3) page, straight from the C++ Standard Libary π
this one is a whole little low-level vibe, so let's get into it β¨
π NAME π
std::chrono::local_info β std::chrono::local_info. that's literally the name section doing its mirror thing πͺ iconic, we move.
β¨ Synopsis β¨
Defined in header <chrono>
struct local_info; (since C++20)
okay so the class local_info describes the result of converting a std::chrono::local_time to a std::chrono::sys_time. no cap, that's the whole main-character job π
- if the result of the conversion is unique, then
result == local_info::unique,firstis filled out with the correctstd::chrono::sys_info, andsecondis zero-initialized. clean, simple, slay β¨ - if the
local_timeis nonexistent, thenresult == local_info::nonexistent,firstis filled out with thestd::chrono::sys_infothat ends just prior to thelocal_time, andsecondis filled out with thestd::chrono::sys_infothat begins just after thelocal_time. that time kinda ghosted the timeline π» - if the
local_timeis ambiguous, thenresult == local_info::ambiguous,firstis filled out with thestd::chrono::sys_infothat ends just after thelocal_time, andsecondis filled with thestd::chrono::sys_infothat starts just before thelocal_time. two timings, one moment, the drama of it all π
lowkey important: this is a low-level data structure; typical conversions fromlocal_timetosys_timewill use it implicitly rather than explicitly. so it's giving backstage crew, not main-stage energy π
π Member constants π
name β value, and yes they're all [static] (public static member constant), periodt:
constexpr int uniqueβ value0;[static](public static member constant).constexpr int nonexistentβ value1;[static](public static member constant).constexpr int ambiguousβ value2;[static](public static member constant).
π¦ Member objects π¦
resultβ typeint.first,secondβ typestd::chrono::sys_info.
πΈ Nonmember functions πΈ
operator<<β outputs alocal_infointo a stream.(C++20)Β·(function template).
π Helper classes π
std::formatter<std::chrono::local_info>β formatting support forlocal_info.(C++20)Β·(class template specialization).
source: http://cppreference.com Β· version/date: 2024.06.10 Β· page: std::chrono::local_info(3) β mwah, bestie, go forth and convert responsibly π
π¦ 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