@@ -723,15 +723,14 @@ mod tests {
723723 rt ! ( opt_none, Option <u8 >, None ) ;
724724 rt ! ( opt_some, Option <u8 >, Some ( 1 ) ) ;
725725
726- rt ! (
727- time,
728- chrono:: NaiveDate ,
729- chrono:: Local :: today( ) . naive_local( )
730- ) ;
726+ rt ! ( time, chrono:: NaiveDate , chrono:: Local :: now( ) . date_naive( ) ) ;
731727 rt ! (
732728 datetime,
733729 chrono:: NaiveDateTime ,
734- chrono:: Utc . ymd( 1989 , 12 , 7 ) . and_hms( 8 , 0 , 4 ) . naive_utc( )
730+ chrono:: Utc
731+ . with_ymd_and_hms( 1989 , 12 , 7 , 8 , 0 , 4 )
732+ . unwrap( )
733+ . naive_utc( )
735734 ) ;
736735 rt ! ( dur, time:: Duration , time:: Duration :: from_secs( 1893 ) ) ;
737736 rt ! ( dur_micro, time:: Duration , time:: Duration :: new( 1893 , 5000 ) ) ;
@@ -915,13 +914,16 @@ mod tests {
915914 rt ! (
916915 time,
917916 chrono:: NaiveDate ,
918- chrono:: Local :: today ( ) . naive_local ( ) ,
917+ chrono:: Local :: now ( ) . date_naive ( ) ,
919918 ColumnType :: MYSQL_TYPE_DATE
920919 ) ;
921920 rt ! (
922921 datetime,
923922 chrono:: NaiveDateTime ,
924- chrono:: Utc . ymd( 1989 , 12 , 7 ) . and_hms( 8 , 0 , 4 ) . naive_utc( ) ,
923+ chrono:: Utc
924+ . with_ymd_and_hms( 1989 , 12 , 7 , 8 , 0 , 4 )
925+ . unwrap( )
926+ . naive_utc( ) ,
925927 ColumnType :: MYSQL_TYPE_DATETIME
926928 ) ;
927929 rt ! (
0 commit comments