Skip to content

Commit

Permalink
Fix serialization of peer structure
Browse files Browse the repository at this point in the history
  • Loading branch information
tailhook committed Jan 29, 2018
1 parent 8beffe5 commit a069705
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Verwalter Changes by Version
============================

.. _changelog-0.10.3:

Verwalter 0.10.3
----------------

* bugfix: timestamps in peer info now serialize as milliseconds since epoch

.. _changelog-0.10.2:

Expand Down
3 changes: 3 additions & 0 deletions src/daemon/peer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use std::time::{SystemTime, UNIX_EPOCH};
use crossbeam::sync::ArcCell;
use elect::ScheduleStamp;
use id::Id;
use serde_millis;


#[derive(Clone, Debug, Serialize)]
Expand All @@ -14,7 +15,9 @@ pub struct Peer {
pub hostname: String,
#[serde(skip_deserializing)]
pub schedule: Option<ScheduleStamp>,
#[serde(with="serde_millis")]
pub known_since: SystemTime,
#[serde(with="serde_millis")]
pub last_report_direct: Option<SystemTime>,
}

Expand Down

0 comments on commit a069705

Please sign in to comment.