std::chrono::time_zone::to_local

From cppreference.com
< cpp‎ | chrono‎ | time zone
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)
chrono I/O
(C++20)
C-style date and time
std::chrono::time_zone
Member functions
time_zone::to_local
Nonmember functions
template < class Duration >

auto to_local( const std::chrono::sys_time <Duration> & tp ) const

- > std::chrono::local_time < std::common_type_t <Duration, std::chrono::seconds >> ;
(since C++20)

Converts the sys_time tp to the corresponding local_time in this time zone.

Return value

The local_time associated with tp and this time zone.

Notes

The precision of the result is at least std::chrono::seconds, and will be finer if the argument has finer precision.