diff --git a/crates/hyperqueue/src/server/event/mod.rs b/crates/hyperqueue/src/server/event/mod.rs index 97b084648..5dc5a7fc9 100644 --- a/crates/hyperqueue/src/server/event/mod.rs +++ b/crates/hyperqueue/src/server/event/mod.rs @@ -3,6 +3,7 @@ pub mod payload; pub mod streamer; use bincode::Options; +use chrono::serde::ts_milliseconds; use chrono::{DateTime, Utc}; use payload::EventPayload; use serde::{Deserialize, Serialize}; @@ -11,6 +12,7 @@ pub type EventId = u32; #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Event { + #[serde(with = "ts_milliseconds")] pub time: DateTime, pub payload: EventPayload, }