summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Klotz <uwe.klotz@slowtec.de>2022-02-15 10:07:33 +0100
committerUwe Klotz <uwe.klotz@slowtec.de>2022-02-15 17:54:21 +0100
commit7c57b028bcdf9c9e0fe1cecc4b69a28077cbfe32 (patch)
tree2ea94a654e11a3e79a1ec4be6cf8b931d8dd1255
parente53d4d76b629ee6198f807e12f93e189ff3b5be8 (diff)
alarm/event: Use clock::Timestamp
Signed-off-by: Uwe Klotz <uwe.klotz@slowtec.de>
-rw-r--r--crates/core/thin_edge_json/src/alarm.rs4
-rw-r--r--crates/core/thin_edge_json/src/event.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/core/thin_edge_json/src/alarm.rs b/crates/core/thin_edge_json/src/alarm.rs
index 44e1dd7b..5e6e1e26 100644
--- a/crates/core/thin_edge_json/src/alarm.rs
+++ b/crates/core/thin_edge_json/src/alarm.rs
@@ -1,7 +1,7 @@
use std::convert::{TryFrom, TryInto};
+use clock::Timestamp;
use serde::Deserialize;
-use time::OffsetDateTime;
/// In-memory representation of ThinEdge JSON alarm.
#[derive(Debug, Deserialize, PartialEq)]
@@ -26,7 +26,7 @@ pub struct ThinEdgeAlarmData {
#[serde(default)]
#[serde(with = "clock::serde::rfc3339::option")]
- pub time: Option<OffsetDateTime>,
+ pub time: Option<Timestamp>,
}
#[derive(thiserror::Error, Debug)]
diff --git a/crates/core/thin_edge_json/src/event.rs b/crates/core/thin_edge_json/src/event.rs
index ad313ab0..cee60967 100644
--- a/crates/core/thin_edge_json/src/event.rs
+++ b/crates/core/thin_edge_json/src/event.rs
@@ -1,5 +1,5 @@
+use clock::Timestamp;
use serde::Deserialize;
-use time::OffsetDateTime;
use self::error::ThinEdgeJsonDeserializerError;
@@ -17,7 +17,7 @@ pub struct ThinEdgeEventData {
#[serde(default)]
#[serde(with = "clock::serde::rfc3339::option")]
- pub time: Option<OffsetDateTime>,
+ pub time: Option<Timestamp>,
}
pub mod error {