A time zone supplies context for reading a time as local civil time. Time zones are political divisions, not just technical settings. A common computer representation stores an offset from UTC as a number of seconds. section 9.4.1
Keep the time zone separate from the timestamp’s epoch: an epoch is the starting point used to count elapsed time. UTC also differs from the fixed-length seconds used by atomic clocks because it incorporates leap seconds. Neither an epoch nor a raw count of seconds tells you which local time zone to display. section 9.1 section 9.4
Listing 9.2 Reading the system time and printing it on the screen
1 use chrono::Local;
2
3 fn main() {
4 let now = Local::now(); #1
5 println!("{}", now);
6 }
This small Rust clock calls `Local::now()` and prints the result. The returned value carries a time zone; the displayed timestamp uses the local zone. section 9.5
When a user supplies a time to set the system clock:
- Parse it as `DateTime<FixedOffset>` to retain the supplied offset. section 9.7.1
- Convert it to `DateTime<Local>` for time-zone comparisons before making the OS-specific time-setting call. section 9.7.1
Be precise about what a time value means. A system clock can jump backward, so a time-zone-aware timestamp is not a substitute for a monotonically increasing clock when measuring progress. section 9.10 section 9.7.1



