diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2022-11-22 01:46:58 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2022-11-22 02:01:03 -0800 |
commit | 08837e7d340887560d74ee4ca09176baf1977317 (patch) | |
tree | 6736f48ebbab610f211e6e1b719f9c1cdfb87b7b | |
parent | d23df351a5413bb2575b30be740473952c88c9be (diff) | |
download | adenosine-08837e7d340887560d74ee4ca09176baf1977317.tar.gz adenosine-08837e7d340887560d74ee4ca09176baf1977317.zip |
pds: pull in 'created_at_now()' helper from CLI
-rw-r--r-- | adenosine-pds/src/lib.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/adenosine-pds/src/lib.rs b/adenosine-pds/src/lib.rs index ea61218..a7cb4ae 100644 --- a/adenosine-pds/src/lib.rs +++ b/adenosine-pds/src/lib.rs @@ -1,3 +1,4 @@ +use adenosine_cli::created_at_now; use adenosine_cli::identifiers::{AtUri, Did, Nsid, Ticker, Tid}; use anyhow::{anyhow, Result}; use askama::Template; @@ -891,10 +892,3 @@ fn record_view_handler( } .render()?) } - -/// Helper to generate the current timestamp as right now, UTC, formatted as a string -pub fn created_at_now() -> String { - let now = time::OffsetDateTime::now_utc(); - now.format(&time::format_description::well_known::Rfc3339) - .unwrap() -} |