Get A Rust DateTime For A Specific Time Zone
---
chrono =
chrono-tz =
---
use TimeZone;
use Tz;
use UTC;
Output:
Sun, 1 Jun 2025 13:00:00 -0400
warning: unused import: `chrono_tz::UTC`
--> /Users/alan/.cargo/target/4b/0baba35be9214e/_active_nvim_run:9:5
|
9 | use chrono_tz::UTC;
| ^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
Notes
- This handles daylight saving time (compared to FixedOffset which does not being that it's fixed)
-- end of line --