27 Time library [time]

27.11 Time zones [time.zone]

27.11.5 Class time_­zone [time.zone.timezone]

27.11.5.2 Member functions [time.zone.members]

string_view name() const noexcept;
Returns: The name of the time_­zone.
[Example
:
"America/New_­York".
— end example
]
template<class Duration> sys_info get_info(const sys_time<Duration>& st) const;
Returns: A sys_­info i for which st is in the range [i.begin, i.end).
template<class Duration> local_info get_info(const local_time<Duration>& tp) const;
Returns: A local_­info for tp.
template<class Duration> sys_time<common_type_t<Duration, seconds>> to_sys(const local_time<Duration>& tp) const;
Returns: A sys_­time that is at least as fine as seconds, and will be finer if the argument tp has finer precision.
This sys_­time is the UTC equivalent of tp according to the rules of this time_­zone.
Throws: If the conversion from tp to a sys_­time is ambiguous, throws ambiguous_­local_­time.
If the tp represents a non-existent time between two UTC time_­points, throws nonexistent_­local_­time.
template<class Duration> sys_time<common_type_t<Duration, seconds>> to_sys(const local_time<Duration>& tp, choose z) const;
Returns: A sys_­time that is at least as fine as seconds, and will be finer if the argument tp has finer precision.
This sys_­time is the UTC equivalent of tp according to the rules of this time_­zone.
If the conversion from tp to a sys_­time is ambiguous, returns the earlier sys_­time if z == choose​::​earliest, and returns the later sys_­time if z == choose​::​latest.
If the tp represents a non-existent time between two UTC time_­points, then the two UTC time_­points will be the same, and that UTC time_­point will be returned.
template<class Duration> local_time<common_type_t<Duration, seconds>> to_local(const sys_time<Duration>& tp) const;
Returns: The local_­time associated with tp and this time_­zone.