From 08837e7d340887560d74ee4ca09176baf1977317 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 22 Nov 2022 01:46:58 -0800 Subject: pds: pull in 'created_at_now()' helper from CLI --- adenosine-pds/src/lib.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'adenosine-pds') 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() -} -- cgit v1.2.3