Skip to content

Commit 109fc95

Browse files
committed
chore(deps): Resolve deprecation warning for chrono Date and ymd methods
Signed-off-by: Joshua Potts <[email protected]>
1 parent a301d9a commit 109fc95

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/postgres/types.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,14 @@ mod chrono {
330330

331331
test_type!(chrono_date_time_tz<DateTime::<FixedOffset>>(Postgres,
332332
"TIMESTAMPTZ '2019-01-02 05:10:20.115100+06:30'"
333-
== FixedOffset::east_opt(60 * 60 * 6 + 1800).unwrap().ymd(2019, 1, 2).and_hms_micro_opt(5, 10, 20, 115100).unwrap()
333+
== FixedOffset::east_opt(60 * 60 * 6 + 1800)
334+
.unwrap()
335+
.from_utc_datetime(
336+
&NaiveDate::from_ymd_opt(2019, 1, 2)
337+
.unwrap()
338+
.and_hms_micro_opt(5, 10, 20, 115100)
339+
.unwrap()
340+
)
334341
));
335342

336343
test_type!(chrono_date_time_tz_vec<Vec<DateTime::<Utc>>>(Postgres,

0 commit comments

Comments
 (0)