MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / to_date_time

Method to_date_time

chirpstack/src/gpstime.rs:106–114  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

104
105impl ToDateTime for Duration {
106 fn to_date_time(&self) -> DateTime<Utc> {
107 let mut t = *GPS_EPOCH_TIME + *self;
108 for ls in LEAP_SECONDS_TABLE.iter() {
109 if ls.0 < t {
110 t -= ls.1;
111 }
112 }
113 t
114 }
115}
116
117#[cfg(test)]

Callers 6

test_get_beacon_startFunction · 0.80
enqueueFunction · 0.80
get_rx_timestampFunction · 0.80
get_rx_timestamp_chronoFunction · 0.80

Calls 1

iterMethod · 0.80

Tested by 1

test_get_beacon_startFunction · 0.64