Files
cppdraft_translate/cppdraft/time/zone/zonedtraits.md
2025-10-25 03:02:53 +03:00

1.4 KiB
Raw Permalink Blame History

[time.zone.zonedtraits]

30 Time library [time]

30.11 Time zones [time.zone]

30.11.6 Class template zoned_traits [time.zone.zonedtraits]

namespace std::chrono {template struct zoned_traits {};}

1

#

zoned_traits provides a means for customizing the behavior of zoned_time<Duration, TimeZonePtr> for the zoned_time default constructor, and constructors taking string_view.

A specialization for const time_zone* is provided by the implementation:namespace std::chrono {template<> struct zoned_traits<const time_zone*> {static const time_zone* default_zone(); static const time_zone* locate_zone(string_view name); };}

🔗

static const time_zone* default_zone();

2

#

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

🔗

static const time_zone* locate_zone(string_view name);

3

#

Returns: std::chrono::locate_zone(name).