File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ fn rfc2822<T: AsRef<str>>(string: T) -> Option<DateTime<FixedOffset>> {
5454
5555fn utc_datetime ( string : & str , format : & str ) -> Option < DateTime < FixedOffset > > {
5656 NaiveDateTime :: parse_from_str ( string, format)
57- . map ( |d| DateTime :: from_utc ( d , Utc ) )
57+ . map ( |d| Utc . from_utc_datetime ( & d ) )
5858 . ok ( )
5959 . map ( |d : DateTime < Utc > | d. into ( ) )
6060}
@@ -63,7 +63,7 @@ fn utc_date(string: &str, format: &str) -> Option<DateTime<FixedOffset>> {
6363 let date = NaiveDate :: parse_from_str ( string, format) . ok ( ) ?;
6464 let time = NaiveTime :: from_hms_opt ( 0 , 0 , 0 ) ?;
6565 let datetime = NaiveDateTime :: new ( date, time) ;
66- Some ( DateTime :: < Utc > :: from_utc ( datetime, Utc ) . into ( ) )
66+ Some ( Utc . from_utc_datetime ( & datetime) . into ( ) )
6767}
6868
6969/// Parses a string using multiple formats
You can’t perform that action at this time.
0 commit comments