Skip to content

Commit

Permalink
Bump chrono to 0.4.30 (#1858)
Browse files Browse the repository at this point in the history
* Bump `chrono` to 0.4.30

* Fix test cases
  • Loading branch information
billy1624 authored Sep 13, 2023
1 parent 4804170 commit f6b94c3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
3 changes: 2 additions & 1 deletion tests/time_crate_tests.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down Expand Up @@ -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",
})
);

Expand Down
8 changes: 4 additions & 4 deletions tests/timestamp_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}))
);

Expand Down Expand Up @@ -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::<DateTimeLocal>().unwrap(),
"deployment_date": "2022-01-07T12:11:23Z".parse::<DateTimeLocal>().unwrap().to_rfc3339(),
}))
);
#[cfg(feature = "sqlx-mysql")]
Expand All @@ -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",
}))
);

Expand Down

0 comments on commit f6b94c3

Please sign in to comment.