std::chrono::system_clock represents system-wide calendar time. Calling now() returns a time_point based on the operating system’s UTC time, which makes it useful for dates and real-world events. section 4.1
The clock is not steady: an administrator or system adjustment can make a later now() appear earlier. Use steady_clock for measuring intervals; system_clock is better when calendar meaning matters. It also maps easily to C’s time_t. section 4.1 section 4.5
Counting down to New Year’s Eve
Capture the current time with std::chrono::system_clock::now(), create a calendar date with year_month_day, convert it using sys_days, and subtract the two time points to obtain a duration. Formatting can print the remaining duration and event date. Because system_clock uses UTC, local countdowns need a time zone to account for daylight saving time. section 4.1 section 4.3.2
std::chrono::time_point now = std::chrono::system_clock::now();
Start with the minimal call that obtains the current system time. section 4.1
