std::chrono::time_zone::to_sys (3) - Linux Manuals
std::chrono::time_zone::to_sys: std::chrono::time_zone::to_sys
Command to display std::chrono::time_zone::to_sys
manual in Linux: $ man 3 std::chrono::time_zone::to_sys
NAME
std::chrono::time_zone::to_sys - std::chrono::time_zone::to_sys
Synopsis
template< class Duration >
auto to_sys(const std::chrono::local_time<Duration>& tp) const (since C++20)
-> std::chrono::sys_time<std::common_type_t<Duration, std::chrono::seconds>>;
template< class Duration >
auto to_sys(const std::chrono::local_time<Duration>& tp, std::chrono::choose z) const (since C++20)
-> std::chrono::sys_time<std::common_type_t<Duration, std::chrono::seconds>>;
Converts the local_time tp in this time zone to the corresponding sys_time.
1) Throws an exception if the conversion is ambiguous or if tp represents a nonexistent time.
2) Resolves ambiguity according to the value of z:
* If z == std::chrono::choose::earliest, returns the earlier sys_time.
* If z == std::chrono::choose::latest, returns the later sys_time
If tp represents a nonexistent time between two UTC time_points, those two time_points will be the same, and that time_point will be returned.
Return value
The UTC equivalent of tp according to the rules of this time zone.
Exceptions
1) Throws a std::chrono::ambiguous_local_time if the conversion is ambiguous. Throws a std::chrono::nonexistent_local_time if tp represents a nonexistent time.
Notes
The precision of the result is at least std::chrono::seconds, and will be finer if the argument has finer precision.
Ambiguous and nonexistent local times can occur as a result of time zone transitions (such as daylight saving time). For example, "2016-03-13 02:30:00" does not exist in the "America/New_York" time zone, while "2016-11-06 01:30:00" in that time zone can correspond to two UTC time points: 2016-11-06 05:30:00 UTC and 2016-11-06 06:30:00 UTC.
Pages related to std::chrono::time_zone::to_sys
- std::chrono::time_zone::to_local (3) - std::chrono::time_zone::to_local
- std::chrono::time_zone::get_info (3) - std::chrono::time_zone::get_info
- std::chrono::time_zone::name (3) - std::chrono::time_zone::name
- std::chrono::time_zone (3) - std::chrono::time_zone
- std::chrono::time_of_day (3) - std::chrono::time_of_day
- std::chrono::time_of_day<Duration>::hours,std::chrono::time_of_day<Duration>::minutes, (3) - std::chrono::time_of_day<Duration>::hours,std::chrono::time_of_day<Duration>::minutes,
- std::chrono::time_of_day<Duration>::make12,std::chrono::time_of_day<Duration>::make24 (3) - std::chrono::time_of_day<Duration>::make12,std::chrono::time_of_day<Duration>::make24
- std::chrono::time_of_day<Duration>::operatorprecision, (3) - std::chrono::time_of_day<Duration>::operatorprecision,
- std::chrono::time_of_day<Duration>::operatorprecision,std::chrono::time_of_day<Duration>::to_duration (3) - std::chrono::time_of_day<Duration>::operatorprecision,std::chrono::time_of_day<Duration>::to_duration
- std::chrono::time_of_day<Duration>::time_of_day (3) - std::chrono::time_of_day<Duration>::time_of_day
- std::chrono::time_point (3) - std::chrono::time_point
- std::chrono::time_point<Clock,Duration>::max (3) - std::chrono::time_point<Clock,Duration>::max
- std::chrono::time_point<Clock,Duration>::min (3) - std::chrono::time_point<Clock,Duration>::min
- std::chrono::time_point<Clock,Duration>::operator++, (3) - std::chrono::time_point<Clock,Duration>::operator++,
- std::chrono::time_point<Clock,Duration>::operator++,std::chrono::time_point<Clock,Duration>::operator-- (3) - - std::chrono::time_point<Clock,Duration>::operator++,std::chrono::time_point<Clock,Duration>::operator--
- std::chrono::time_point<Clock,Duration>::operator+,operator- (3) - - std::chrono::time_point<Clock,Duration>::operator+,operator-
- std::chrono::time_point<Clock,Duration>::time_point (3) - std::chrono::time_point<Clock,Duration>::time_point
- std::chrono::time_point<Clock,Duration>::time_since_epoch (3) - std::chrono::time_point<Clock,Duration>::time_since_epoch
- std::chrono::time_point_cast (3) - std::chrono::time_point_cast
- std::chrono::tai_clock (3) - std::chrono::tai_clock