Skip to main content

now

Function now 

Source
pub fn now() -> String
Expand description

The envelope’s timestamp, in the one spelling both writers use: date -u +%Y-%m-%dT%H:%M:%SZ, to the second, always UTC.

crate::peers::rfc3339 already renders that spelling for the peer board; a second clock in this file would be a second answer to what time it is.

let t = majordomus_cli::ledger::now();
assert_eq!(t.len(), 20, "{t}");
assert!(t.ends_with('Z') && t.contains('T'), "{t}");