From 1acef755ca8a0a0433a98e4a66433c63ee0a3b09 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Mon, 30 Oct 2023 08:45:45 -0700 Subject: chore: remove usage of chrono::Utc::now() (#20995) Remove usage of Chrono's clock feature which pulls in iana-time-zone -> core-foundation --- cli/tools/jupyter/jupyter_msg.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cli') diff --git a/cli/tools/jupyter/jupyter_msg.rs b/cli/tools/jupyter/jupyter_msg.rs index da6654cae..8540a7f37 100644 --- a/cli/tools/jupyter/jupyter_msg.rs +++ b/cli/tools/jupyter/jupyter_msg.rs @@ -4,7 +4,6 @@ // Copyright 2020 The Evcxr Authors. MIT license. use bytes::Bytes; -use chrono::Utc; use data_encoding::HEXLOWER; use deno_core::anyhow::anyhow; use deno_core::anyhow::bail; @@ -15,6 +14,8 @@ use ring::hmac; use std::fmt; use uuid::Uuid; +use crate::util::time::utc_now; + pub(crate) struct Connection { pub(crate) socket: S, /// Will be None if our key was empty (digest authentication disabled). @@ -177,7 +178,7 @@ impl JupyterMessage { header["msg_type"] = serde_json::Value::String(msg_type.to_owned()); header["username"] = serde_json::Value::String("kernel".to_owned()); header["msg_id"] = serde_json::Value::String(Uuid::new_v4().to_string()); - header["date"] = serde_json::Value::String(Utc::now().to_rfc3339()); + header["date"] = serde_json::Value::String(utc_now().to_rfc3339()); JupyterMessage { zmq_identities: Vec::new(), -- cgit v1.2.3