diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2023-10-30 08:45:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-30 11:45:45 -0400 |
commit | 1acef755ca8a0a0433a98e4a66433c63ee0a3b09 (patch) | |
tree | 015ce439d800e8e35916d498de3780e6ee03e0df /cli/tools/jupyter/jupyter_msg.rs | |
parent | 02cc37e05494e576ea8e120b9fe21b447da9546b (diff) |
chore: remove usage of chrono::Utc::now() (#20995)
Remove usage of Chrono's clock feature which pulls in iana-time-zone ->
core-foundation
Diffstat (limited to 'cli/tools/jupyter/jupyter_msg.rs')
-rw-r--r-- | cli/tools/jupyter/jupyter_msg.rs | 5 |
1 files changed, 3 insertions, 2 deletions
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<S> { 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(), |