std::chrono::time_zone::to_local

From cppreference.com
< cpp‎ | chrono‎ | time zone
 
 
Utilities library
General utilities
Date and time
Function objects
Formatting library (C++20)
(C++11)
Relational operators (deprecated in C++20)
Integer comparison functions
(C++20)(C++20)(C++20)   
(C++20)
Swap and type operations
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
Common vocabulary types
(C++11)
(C++17)
(C++17)
(C++17)
(C++11)
(C++17)
(C++23)
Elementary string conversions
(C++17)
(C++17)
 
 
 
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.