High(er) level Rust interface for libtz-sys.
Add this to your Cargo.toml
:
toml
[dependencies]
libtz = "0.1.0"
```rust use libtz::{Timezone, TimeT}; use std::time::{SystemTime, UNIX_EPOCH};
let tz = libtz::Timezone::default()?; let tm = tz.localtime(SystemTime::now().durationsince(UNIXEPOCH)?.as_secs() as TimeT)?; println!("tm = {:?}", tm);
```
Copyright © 2023 David Caldwell david@porkrind.org
MIT Licensed. See LICENSE.md for details.