Parse A DateTime That Has A Time Zone With Rust's chrono Crate
Introduction
My Grimoire uses RFC 3339 timestamp strings1. They're like ISO 86012 but with a few more restrictions on them (e.g. years must be four digits).
This is the code I use to parse them with Rust's chrono3 crate looks like this:
The Code
---
anyhow = "1.0.98"
chrono = "0.4.40"
---
use Result;
use DateTime;
Output:
Mon, 14 Apr 2025 15:58:47 -0400
-- end of line --