summaryrefslogtreecommitdiffstats
path: root/adenosine-pds/src
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2022-11-22 01:46:58 -0800
committerBryan Newbold <bnewbold@robocracy.org>2022-11-22 02:01:03 -0800
commit08837e7d340887560d74ee4ca09176baf1977317 (patch)
tree6736f48ebbab610f211e6e1b719f9c1cdfb87b7b /adenosine-pds/src
parentd23df351a5413bb2575b30be740473952c88c9be (diff)
downloadadenosine-08837e7d340887560d74ee4ca09176baf1977317.tar.gz
adenosine-08837e7d340887560d74ee4ca09176baf1977317.zip
pds: pull in 'created_at_now()' helper from CLI
Diffstat (limited to 'adenosine-pds/src')
-rw-r--r--adenosine-pds/src/lib.rs8
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()
-}