diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2023-03-15 12:44:22 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-15 07:14:22 +0000 |
commit | 51649272bd388f14685a47cfe805bd9cdb602240 (patch) | |
tree | 86be1cd73d9c7a0d095d5ca82fc4fa756fe45b65 /cli/tools/upgrade.rs | |
parent | 6f9c0a9b7a4afd0d73ab312347427e445c67f6c9 (diff) |
perf: do not depend on iana-time-zone (#18088)
Chrono's `clock` feature pulls in `iana-time-zone` which links to macOS
core_foundation. This PR itself is not enough to get rid of
CoreFoundation. Removal depends on getting rid of security framework,
see #18071
Diffstat (limited to 'cli/tools/upgrade.rs')
-rw-r--r-- | cli/tools/upgrade.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/tools/upgrade.rs b/cli/tools/upgrade.rs index b56be5c57..039e00b00 100644 --- a/cli/tools/upgrade.rs +++ b/cli/tools/upgrade.rs @@ -9,6 +9,7 @@ use crate::http_util::HttpClient; use crate::proc_state::ProcState; use crate::util::progress_bar::ProgressBar; use crate::util::progress_bar::ProgressBarStyle; +use crate::util::time; use crate::version; use deno_core::anyhow::bail; @@ -60,7 +61,7 @@ impl RealUpdateCheckerEnvironment { http_client, cache_file_path, // cache the current time - current_time: chrono::Utc::now(), + current_time: time::utc_now(), } } } @@ -702,7 +703,7 @@ mod test { file_text: Default::default(), current_version: Default::default(), latest_version: Arc::new(Mutex::new(Ok("".to_string()))), - time: Arc::new(Mutex::new(chrono::Utc::now())), + time: Arc::new(Mutex::new(crate::util::time::utc_now())), } } |