From fa1ba256d20236042455abb31a92d2a1d27ee58f Mon Sep 17 00:00:00 2001 From: Felipe Baltor Date: Thu, 23 May 2024 08:59:11 -0300 Subject: refactor: remove custom `utc_now` in favor of `chrono::Utc:now` feature (#23888) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR removes the use of the custom `utc_now` function in favor of the `chrono` implementation. It resolves #22864. --------- Co-authored-by: Bartek IwaƄczuk --- tests/Cargo.toml | 2 +- tests/integration/jupyter_tests.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/Cargo.toml b/tests/Cargo.toml index af220aae7..4b8db9564 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -33,7 +33,7 @@ required-features = ["run"] [dev-dependencies] bytes.workspace = true -chrono.workspace = true +chrono = { workspace = true, features = ["now"] } deno_ast.workspace = true deno_bench_util.workspace = true deno_cache_dir = { workspace = true } diff --git a/tests/integration/jupyter_tests.rs b/tests/integration/jupyter_tests.rs index c7b2712e8..e0733d5a3 100644 --- a/tests/integration/jupyter_tests.rs +++ b/tests/integration/jupyter_tests.rs @@ -25,9 +25,6 @@ use zeromq::SocketRecv; use zeromq::SocketSend; use zeromq::ZmqMessage; -// for the `utc_now` function -include!("../../cli/util/time.rs"); - /// Jupyter connection file format #[derive(Serialize)] struct ConnectionSpec { @@ -138,7 +135,7 @@ impl Default for MsgHeader { Self { msg_id: Uuid::new_v4(), session: Uuid::new_v4(), - date: utc_now(), + date: chrono::Utc::now(), username: "test".into(), msg_type: "kernel_info_request".into(), version: "5.3".into(), -- cgit v1.2.3