Skip to content

Commit

Permalink
Serialize journal time stamp as number (not as a datetime string)
Browse files Browse the repository at this point in the history
  • Loading branch information
spirali committed Sep 12, 2024
1 parent a52efe6 commit 99b1b59
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/hyperqueue/src/server/event/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -11,6 +12,7 @@ pub type EventId = u32;

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Event {
#[serde(with = "ts_milliseconds")]
pub time: DateTime<Utc>,
pub payload: EventPayload,
}
Expand Down

0 comments on commit 99b1b59

Please sign in to comment.