pub fn localtime(sec: time_t) -> Result<tm>
Expand description

Converts Unix time to calendar time based on current locale.

This is a sound version of localtime_r from libc with proper locking. Calling this and concurently setting env from Rust using std::env::set_var is completely fine. Calling this in parallel is also fine.