libtad_models/time/
time.rs

1use super::{DateTime, TimeZone};
2use serde::Deserialize;
3
4#[derive(Debug, Deserialize)]
5/// Information about date, time and timezone.
6pub struct Time {
7    /// ISO representation of date and time, time zone included
8    /// (see <https://services.timeanddate.com/api/doc/v3/bi01.html#ISO8601>)
9    /// if different from UTC. If time is not applicable, only the date is shown.
10    ///
11    /// Example: 2011-06-08T09:18:16+02:00
12    /// Example: 2011-06-08T07:18:16 (UTC time)
13    /// Example: 2011-06-08 (only date)
14    pub iso: String,
15
16    /// Date and time, split up into components.
17    pub datetime: DateTime,
18
19    /// Time zone information.
20    pub timezone: Option<TimeZone>,
21}