Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::chrono::zoned_traits

      From cppreference.com
      <cpp‎ |chrono
       
       
      Date and time library
       
      Defined in header<chrono>
      template<class TimeZonePtr>
      struct zoned_traits{};
      (1)(since C++20)
      template<>
      struct zoned_traits<conststd::chrono::time_zone*>;
      (2)(since C++20)

      The classzoned_traits provides a way to customize the behavior of the constructors ofstd::chrono::zoned_time with custom time zone pointer types. In particular, it allows such types to specify the default time zone to use and the mapping of a time zone's name to the corresponding time zone pointer. It is acceptable for custom time zone pointer types to not support either operation, in which case the corresponding constructors ofzoned_time will not participate in overload resolution.

      The primary template is empty. A specialization is provided forconststd::chrono::time_zone*, the default time zone pointer type.

      Contents

      [edit] Member functions

      std::chrono::zoned_traits<const std::chrono::time_zone*>::default_zone

      staticconststd::chrono::time_zone* default_zone();

      Returns a time zone pointer for the default time zone (UTC).

      Return value

      std::chrono::locate_zone("UTC").

      std::chrono::zoned_traits<const std::chrono::time_zone*>::locate_zone

      staticconststd::chrono::time_zone* locate_zone(std::string_view name);

      Returns the time zone pointer for the time zone designated byname.

      Return value

      std::chrono::locate_zone(name).

      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/chrono/zoned_traits&oldid=146316"

      [8]ページ先頭

      ©2009-2025 Movatter.jp