@@ -86,25 +86,25 @@ fn test_datetime() {
86
86
// JSON
87
87
let date: DateTime < Utc > = s. get ( "json_datetime" ) . unwrap ( ) ;
88
88
89
- assert_eq ! ( date, Utc . ymd ( 2017 , 5 , 10 ) . and_hms ( 2 , 14 , 53 ) ) ;
89
+ assert_eq ! ( date, Utc . with_ymd_and_hms ( 2017 , 5 , 10 , 2 , 14 , 53 ) . unwrap ( ) ) ;
90
90
91
91
// TOML
92
92
let date: DateTime < Utc > = s. get ( "toml_datetime" ) . unwrap ( ) ;
93
93
94
- assert_eq ! ( date, Utc . ymd ( 2017 , 5 , 11 ) . and_hms ( 14 , 55 , 15 ) ) ;
94
+ assert_eq ! ( date, Utc . with_ymd_and_hms ( 2017 , 5 , 11 , 14 , 55 , 15 ) . unwrap ( ) ) ;
95
95
96
96
// YAML
97
97
let date: DateTime < Utc > = s. get ( "yaml_datetime" ) . unwrap ( ) ;
98
98
99
- assert_eq ! ( date, Utc . ymd ( 2017 , 6 , 12 ) . and_hms ( 10 , 58 , 30 ) ) ;
99
+ assert_eq ! ( date, Utc . with_ymd_and_hms ( 2017 , 6 , 12 , 10 , 58 , 30 ) . unwrap ( ) ) ;
100
100
101
101
// INI
102
102
let date: DateTime < Utc > = s. get ( "ini_datetime" ) . unwrap ( ) ;
103
103
104
- assert_eq ! ( date, Utc . ymd ( 2017 , 5 , 10 ) . and_hms ( 2 , 14 , 53 ) ) ;
104
+ assert_eq ! ( date, Utc . with_ymd_and_hms ( 2017 , 5 , 10 , 2 , 14 , 53 ) . unwrap ( ) ) ;
105
105
106
106
// RON
107
107
let date: DateTime < Utc > = s. get ( "ron_datetime" ) . unwrap ( ) ;
108
108
109
- assert_eq ! ( date, Utc . ymd ( 2021 , 4 , 19 ) . and_hms ( 11 , 33 , 2 ) ) ;
109
+ assert_eq ! ( date, Utc . with_ymd_and_hms ( 2021 , 4 , 19 , 11 , 33 , 2 ) . unwrap ( ) ) ;
110
110
}
0 commit comments