std::chrono...zoned_time)(3)

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

πŸ’– C++ Standard Libary β€” std::chrono...zoned_time)(3) πŸ’–

hey bestie, welcome to the C++ Standard Libary manual page for std::chrono...zoned_time)(3) β€” yes, that’s the manual name and the page tag, and we’re about to get into std::chrono::operator<<(std::chrono::zoned_time). stay with me, it’s giving β€œniche chrono lore” and honestly it slays πŸ’…


🌸 NAME 🌸

std::chrono::operator<<(std::chrono::zoned_time) - std::chrono::operator<<(std::chrono::zoned_time)

that’s the NAME, no cap β€” same function name listed twice, and we’re moving on 🫢


✨ Synopsis ✨

Defined in header <chrono>, bestie:

          Defined in header <chrono>
          template< class CharT, class Traits, class Duration, class
          TimeZonePtr >

          std::basic_ostream<CharT, Traits>&
       (since C++20)
              operator<<( std::basic_ostream<CharT, Traits>& os,

                          const std::chrono::zoned_time<Duration, TimeZonePtr>&
          tp );

So this is since C++20, and the vibe is: it outputs tp to the stream os, as if by std::format(os.getloc(), fmt, tp), where fmt is "{:L%F %T %Z}" if CharT is char, or L"{:L%F %T %Z}" if CharT is wchar_t. literally that exact format string, don’t come for me 😭


πŸŽ€ Parameters πŸŽ€

  • os β€” output stream
  • tp β€” zoned_time to output

πŸ’œ Return value πŸ’œ

  • os β€” yep, it returns os, that’s the whole return value, periodt ✨

πŸ¦‹ Example πŸ¦‹

This section is incomplete 😭

Reason: no example

ngl, no example here, that’s the tea πŸ“


🩹 Defect reports 🩹

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

  • DR β€” P2372R3
  • Applied to β€” C++20
  • Behavior as published β€” the given locale was used by default
  • Correct behavior β€” L is needed to use the given locale

that’s the whole defect-report moment, bestie πŸ”₯


🌈 See also 🌈

  • std::formatter<std::chrono::zoned_time> β€” formatting support for zoned_time (C++20) (class template specialization)

🧚 Category 🧚

  • * Todo no example

okay that’s the page, bestie πŸ’… source/version/date moment: http://cppreference.com, 2024.06.10, and page tag std::chrono...zoned_time)(3) β€” bye, slay 🫢

πŸ“¦ where this page comes from