# std::chrono::time_zone::to_local

> C++ Atlas: `cppatlas.com/w/cpp/chrono/time_zone/to_local` | Source: https://en.cppreference.com/w/cpp/chrono/time_zone/to_local | Domain: Date and time utilities | Standards: C++20

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

## Official Specification Summary (cppreference)

```cpp
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.

---
Attribution: content from https://en.cppreference.com/w/cpp/chrono/time_zone/to_local (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.