diff --git a/src/items/builder.rs b/src/items/builder.rs index 021fae8..ae241c1 100644 --- a/src/items/builder.rs +++ b/src/items/builder.rs @@ -223,9 +223,9 @@ impl DateTimeBuilder { dt.year(), dt.month(), dt.day(), - hour, - minute, - second, + hour as u32, + minute as u32, + second as u32, nanosecond, offset, )?; diff --git a/src/items/time.rs b/src/items/time.rs index 56328bf..5ece5c2 100644 --- a/src/items/time.rs +++ b/src/items/time.rs @@ -51,11 +51,25 @@ use super::{ #[derive(PartialEq, Clone, Debug, Default)] pub(crate) struct Time { - pub hour: u32, - pub minute: u32, - pub second: u32, - pub nanosecond: u32, - pub offset: Option, + pub(crate) hour: u8, + pub(crate) minute: u8, + pub(crate) second: u8, + pub(crate) nanosecond: u32, + pub(crate) offset: Option, +} + +impl TryFrom