std::chrono::zoned_traits

From cppreference.com
< cpp‎ | chrono
Date and time library
Time point
(C++11)
(C++20)
Duration
(C++11)
Clocks
(C++11)
(C++11)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
Time of day
(C++20)(C++20)
(C++20)(C++20)
(C++20)

Calendar
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)(C++20)
Time zone
(C++20)
(C++20)
(C++20) (C++20) (C++20) (C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
zoned_traits
(C++20)
(C++20)
(C++20)
(C++20)

chrono I/O
(C++20)
C-style date and time
Defined in header <chrono>
template < class TimeZonePtr >
struct zoned_traits { } ;
(1) (since C++20)
template <>
struct zoned_traits< const std::chrono::time_zone * > ;
(2) (since C++20)

The class zoned_traits provides a way to customize the behavior of the constructors of std::chrono::zoned_time zoned_time

The primary template is empty. A specialization is provided for const std::chrono::time_zone *

Member functions

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

static const std::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

static const std::chrono::time_zone * locate_zone( std::string_view name) ;

Returns the time zone pointer for the time zone designated by name.

Return value

std::chrono::locate_zone (name)