std::time_t(3)
okay so bestie π, this is the std::time_t(3) page from the C++ Standard Libary manual, and time_t is lowkey having a main character moment. let's get into it β¨
β¨ NAME β¨
std::time_tβstd::time_t(that's the whole name, bestie, no notes π )
π¦ Synopsis π¦
here's the vibe check on where it lives and what it looks like:
Defined in header <ctime>
typedef /* unspecified */ time_t;
so time_t is an arithmetic type capable of representing times β¨
the exact type is not defined, but it's almost always an integral value holding the number of seconds β and no, we are not counting leap seconds π β since 00:00, Jan 1 1970 UTC, corresponding to POSIX time. that's the origin story, periodt.
π« See also π«
the girlies in the same friend group are:
timeβ returns the current time of the system as time since epoch (function)localtimeβ converts time since epoch to calendar time expressed as local time (function)gmtimeβ converts time since epoch to calendar time expressed as Universal Coordinated Time (function)to_time_tβ converts a system clock time point tostd::time_tβ[static](public static member function ofstd::chrono::system_clock)- C documentation for
time_t
mwah π β source/version/date check: http://cppreference.com, 2024.06.10, on page std::time_t(3). bye bestie, go flex that <ctime> knowledge π«Άβ¨
π¦ 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