From f90c01f702f6a98b041f766b6a1d857bc1b9afef Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Mon, 11 Sep 2023 09:26:05 +0100 Subject: replace chrono with time (#806) * replace chrono with time * Fix test chrono usage --------- Co-authored-by: Ellie Huxtable --- atuin-client/src/history/builder.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'atuin-client/src/history/builder.rs') diff --git a/atuin-client/src/history/builder.rs b/atuin-client/src/history/builder.rs index dc22b60e..27531c95 100644 --- a/atuin-client/src/history/builder.rs +++ b/atuin-client/src/history/builder.rs @@ -1,4 +1,3 @@ -use chrono::Utc; use typed_builder::TypedBuilder; use super::History; @@ -8,7 +7,7 @@ use super::History; /// The only two required fields are `timestamp` and `command`. #[derive(Debug, Clone, TypedBuilder)] pub struct HistoryImported { - timestamp: chrono::DateTime, + timestamp: time::OffsetDateTime, #[builder(setter(into))] command: String, #[builder(default = "unknown".into(), setter(into))] @@ -45,7 +44,7 @@ impl From for History { /// the command is finished, such as `exit` or `duration`. #[derive(Debug, Clone, TypedBuilder)] pub struct HistoryCaptured { - timestamp: chrono::DateTime, + timestamp: time::OffsetDateTime, #[builder(setter(into))] command: String, #[builder(setter(into))] @@ -73,14 +72,14 @@ impl From for History { #[derive(Debug, Clone, TypedBuilder)] pub struct HistoryFromDb { id: String, - timestamp: chrono::DateTime, + timestamp: time::OffsetDateTime, command: String, cwd: String, exit: i64, duration: i64, session: String, hostname: String, - deleted_at: Option>, + deleted_at: Option, } impl From for History { -- cgit v1.3.1