MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / timestamp_proto

Function timestamp_proto

libatomic/src/daemon/convert.rs:21–26  ·  view source on GitHub ↗
(time: chrono::DateTime<chrono::Utc>)

Source from the content-addressed store, hash-verified

19}
20
21pub fn timestamp_proto(time: chrono::DateTime<chrono::Utc>) -> prost_types::Timestamp {
22 prost_types::Timestamp {
23 seconds: time.timestamp(),
24 nanos: time.timestamp_subsec_nanos() as i32,
25 }
26}
27
28pub fn timestamp_domain(stamp: &prost_types::Timestamp) -> chrono::DateTime<chrono::Utc> {
29 chrono::DateTime::from_timestamp(stamp.seconds, stamp.nanos.max(0) as u32)

Callers 7

change_infoFunction · 0.70
recordMethod · 0.70
unrecordMethod · 0.70
publication_protoFunction · 0.70
open_sandboxMethod · 0.70
renew_sandboxMethod · 0.70
tag_infoFunction · 0.70

Calls 1

timestampMethod · 0.45

Tested by

no test coverage detected