From 1e7798bee4b02a3ce815c80375a79783fb49db5d Mon Sep 17 00:00:00 2001 From: Huliiiii <134658521+Huliiiiii@users.noreply.github.com> Date: Thu, 31 Jul 2025 20:41:57 +0800 Subject: [PATCH] Fix wrong casting of array of Datetime --- sea-query-binder/src/sqlx_postgres.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sea-query-binder/src/sqlx_postgres.rs b/sea-query-binder/src/sqlx_postgres.rs index c51cfff88..71d483eee 100644 --- a/sea-query-binder/src/sqlx_postgres.rs +++ b/sea-query-binder/src/sqlx_postgres.rs @@ -1,7 +1,7 @@ #[cfg(feature = "with-bigdecimal")] use bigdecimal::BigDecimal; #[cfg(feature = "with-chrono")] -use chrono::{DateTime, Local, NaiveDate, NaiveDateTime, NaiveTime, Utc}; +use chrono::{DateTime, FixedOffset, Local, NaiveDate, NaiveDateTime, NaiveTime, Utc}; #[cfg(feature = "with-ipnetwork")] use ipnetwork::IpNetwork; #[cfg(feature = "with-mac_address")] @@ -247,7 +247,7 @@ impl sqlx::IntoArguments<'_, sqlx::postgres::Postgres> for SqlxValues { } #[cfg(feature = "with-chrono")] ArrayType::ChronoDateTimeWithTimeZone => { - let value: Option>> = Value::Array(ty, v).expect( + let value: Option>> = Value::Array(ty, v).expect( "This Value::Array should consist of Value::ChronoDateTimeWithTimeZone", ); let _ = args.add(value);