diff --git a/Cargo.toml b/Cargo.toml index fad290968..036ea2bd7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ path = "src/lib.rs" [dependencies] async-stream = { version = "0.3", default-features = false } async-trait = { version = "0.1", default-features = false } -chrono = { version = "0.4.20", default-features = false, optional = true } +chrono = { version = "0.4.30", default-features = false, optional = true } time = { version = "0.3", default-features = false, optional = true } futures = { version = "0.3", default-features = false, features = ["std"] } log = { version = "0.4", default-features = false } diff --git a/tests/time_crate_tests.rs b/tests/time_crate_tests.rs index 39d8256e4..6a940330f 100644 --- a/tests/time_crate_tests.rs +++ b/tests/time_crate_tests.rs @@ -1,5 +1,6 @@ pub mod common; pub use common::{features::*, setup::*, TestContext}; +use pretty_assertions::assert_eq; use sea_orm::{entity::prelude::*, DatabaseConnection, IntoActiveModel}; use serde_json::json; use time::macros::{date, time}; @@ -49,7 +50,7 @@ pub async fn create_transaction_log(db: &DatabaseConnection) -> Result<(), DbErr "date": "2022-03-13", "time": "16:24:00", "date_time": "2022-03-13T16:24:00", - "date_time_tz": "2022-03-13T16:24:00+00:00", + "date_time_tz": "2022-03-13T16:24:00Z", }) ); diff --git a/tests/timestamp_tests.rs b/tests/timestamp_tests.rs index c151ee331..90e2da638 100644 --- a/tests/timestamp_tests.rs +++ b/tests/timestamp_tests.rs @@ -62,7 +62,7 @@ pub async fn create_applog(db: &DatabaseConnection) -> Result<(), DbErr> { "id": 1, "action": "Testing", "json": "HI", - "created_at": "2021-09-17T09:50:20+00:00", + "created_at": "2021-09-17T09:50:20Z", })) ); @@ -91,7 +91,7 @@ pub async fn create_satellites_log(db: &DatabaseConnection) -> Result<(), DbErr> "id": 1, "satellite_name": "Sea-00001-2022", "launch_date": "2022-01-07T12:11:23+00:00", - "deployment_date": "2022-01-07T12:11:23Z".parse::().unwrap(), + "deployment_date": "2022-01-07T12:11:23Z".parse::().unwrap().to_rfc3339(), })) ); #[cfg(feature = "sqlx-mysql")] @@ -110,8 +110,8 @@ pub async fn create_satellites_log(db: &DatabaseConnection) -> Result<(), DbErr> Some(serde_json::json!({ "id": 1, "satellite_name": "Sea-00001-2022", - "launch_date": "2022-01-07T12:11:23+00:00", - "deployment_date": "2022-01-07T12:11:23+00:00", + "launch_date": "2022-01-07T12:11:23Z", + "deployment_date": "2022-01-07T12:11:23Z", })) );