Skip to content

Commit

Permalink
genesis-builder: Serialize also the timestamp using RFC3339
Browse files Browse the repository at this point in the history
Make `GenesisConfig` to also use RFC3339 to serialize the timestamp.
  • Loading branch information
jsdanielh committed Jul 26, 2023
1 parent fdf6c88 commit 291b4c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion genesis-builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ hex = "0.4"
log = { package = "tracing", version = "0.1" }
serde = "1.0"
thiserror = "1.0"
time = { version = "0.3", features = ["parsing", "serde"] }
time = { version = "0.3", features = ["formatting", "parsing", "serde"] }
toml = "0.7"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

Expand Down
2 changes: 1 addition & 1 deletion genesis-builder/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub struct GenesisConfig {
pub parent_hash: Option<Blake2bHash>,

/// Timestamp for the genesis block.
#[serde(deserialize_with = "time::serde::rfc3339::option::deserialize")]
#[serde(with = "time::serde::rfc3339::option")]
pub timestamp: Option<OffsetDateTime>,

/// The set of validators for the genesis state.
Expand Down

0 comments on commit 291b4c3

Please sign in to comment.