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 authored and Kobzol committed Sep 12, 2024
1 parent e493472 commit 0b59080
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 0b59080

Please sign in to comment.