1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
use super::DateTime;
use serde::Deserialize;
#[derive(Deserialize)]
/// Information about a time change.
pub struct TimeChange {
/// New DST offset in seconds. Value will be empty if there is no DST for this location.
pub newdst: Option<i32>,
/// New time zone offset to UTC in seconds if there is a time zone change for this place.
/// Otherwise the value will be empty. Time zone changes happen only very rarely, so the field
/// will be empty on most occasions.
pub newzone: Option<i32>,
/// New total offset to UTC in seconds.
pub newoffset: i32,
/// Time stamp of transition in UTC time, formatted as ISO 8601 time.
///
/// Example: 2011-03-27T01:00:00
pub utctime: String,
/// Local time before transition, formatted as ISO 8601 time.
///
/// Example: 2011-03-27T02:00:00
pub oldlocaltime: String,
/// Local time after transition, formatted as ISO 8601 time.
///
/// Example: 2011-03-27T03:00:00
pub newlocaltime: String,
/// Verbose representation of the time stamps.
pub verbose: Option<VerboseTimeChange>,
}
#[derive(Deserialize)]
/// Verbose reprsentation of time change time stamps.
pub struct VerboseTimeChange {
/// Time stamp of transition in UTC time, split up into components.
pub utctime: DateTime,
/// Local time before transition, split up into components.
pub oldlocaltime: DateTime,
/// Local time after transition, split up into components.
pub newlocaltime: DateTime,
}