summaryrefslogtreecommitdiffstats
path: root/atuin-client/src/history
diff options
context:
space:
mode:
authorConrad Ludgate <conradludgate@gmail.com>2023-09-11 09:26:05 +0100
committerGitHub <noreply@github.com>2023-09-11 09:26:05 +0100
commitf90c01f702f6a98b041f766b6a1d857bc1b9afef (patch)
tree04a4755bd632abdcf398d0ce903163ed60a5a212 /atuin-client/src/history
parent2342a3392349c0ae9d742e9da9833590e6567d08 (diff)
replace chrono with time (#806)
* replace chrono with time * Fix test chrono usage --------- Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
Diffstat (limited to 'atuin-client/src/history')
-rw-r--r--atuin-client/src/history/builder.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/atuin-client/src/history/builder.rs b/atuin-client/src/history/builder.rs
index dc22b60e4..27531c95d 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<Utc>,
+ timestamp: time::OffsetDateTime,
#[builder(setter(into))]
command: String,
#[builder(default = "unknown".into(), setter(into))]
@@ -45,7 +44,7 @@ impl From<HistoryImported> for History {
/// the command is finished, such as `exit` or `duration`.
#[derive(Debug, Clone, TypedBuilder)]
pub struct HistoryCaptured {
- timestamp: chrono::DateTime<Utc>,
+ timestamp: time::OffsetDateTime,
#[builder(setter(into))]
command: String,
#[builder(setter(into))]
@@ -73,14 +72,14 @@ impl From<HistoryCaptured> for History {
#[derive(Debug, Clone, TypedBuilder)]
pub struct HistoryFromDb {
id: String,
- timestamp: chrono::DateTime<Utc>,
+ timestamp: time::OffsetDateTime,
command: String,
cwd: String,
exit: i64,
duration: i64,
session: String,
hostname: String,
- deleted_at: Option<chrono::DateTime<Utc>>,
+ deleted_at: Option<time::OffsetDateTime>,
}
impl From<HistoryFromDb> for History {