Skip to content

Commit 7cf4f4e

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 7cf4f4e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/postgres/types.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,15 @@ 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_local_datetime(
336+
&NaiveDate::from_ymd_opt(2019, 1, 2)
337+
.unwrap()
338+
.and_hms_micro_opt(5, 10, 20, 115_100)
339+
.unwrap()
340+
)
341+
.unwrap()
334342
));
335343

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

0 commit comments

Comments
 (0)