33
44use chrono:: { DateTime , Datelike , FixedOffset , NaiveDate , TimeZone , Timelike } ;
55
6- use super :: { date, relative, time, weekday, year} ;
6+ use super :: { date, relative, time, timezone , weekday, year} ;
77
88/// The builder is used to construct a DateTime object from various components.
99/// The parser creates a `DateTimeBuilder` object with the parsed components,
@@ -17,7 +17,7 @@ pub(crate) struct DateTimeBuilder {
1717 date : Option < date:: Date > ,
1818 time : Option < time:: Time > ,
1919 weekday : Option < weekday:: Weekday > ,
20- timezone : Option < time :: Offset > ,
20+ timezone : Option < timezone :: Offset > ,
2121 relative : Vec < relative:: Relative > ,
2222}
2323
@@ -86,7 +86,7 @@ impl DateTimeBuilder {
8686 Ok ( self )
8787 }
8888
89- pub ( super ) fn set_timezone ( mut self , timezone : time :: Offset ) -> Result < Self , & ' static str > {
89+ pub ( super ) fn set_timezone ( mut self , timezone : timezone :: Offset ) -> Result < Self , & ' static str > {
9090 if self . timestamp . is_some ( ) {
9191 return Err ( "timestamp cannot be combined with other date/time items" ) ;
9292 } else if self . timezone . is_some ( ) {
@@ -338,7 +338,7 @@ fn new_date(
338338/// Restores year, month, day, etc after applying the timezone
339339/// returns None if timezone overflows the date
340340fn with_timezone_restore (
341- offset : time :: Offset ,
341+ offset : timezone :: Offset ,
342342 at : DateTime < FixedOffset > ,
343343) -> Option < DateTime < FixedOffset > > {
344344 let offset: FixedOffset = chrono:: FixedOffset :: try_from ( offset) . ok ( ) ?;
0 commit comments