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 --- ext/kv/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ext/kv/lib.rs') diff --git a/ext/kv/lib.rs b/ext/kv/lib.rs index 72e1cab30..285614389 100644 --- a/ext/kv/lib.rs +++ b/ext/kv/lib.rs @@ -4,7 +4,6 @@ pub mod dynamic; mod interface; pub mod remote; pub mod sqlite; -mod time; use std::borrow::Cow; use std::cell::RefCell; @@ -56,7 +55,6 @@ use denokv_proto::WatchStream; use log::debug; use serde::Deserialize; use serde::Serialize; -use time::utc_now; pub use crate::interface::*; @@ -772,7 +770,7 @@ async fn op_kv_atomic_write( where DBH: DatabaseHandler + 'static, { - let current_timestamp = utc_now(); + let current_timestamp = chrono::Utc::now(); let db = { let state = state.borrow(); let resource = -- cgit v1.2.3