diff options
author | Jonathan Davies <jpds@protonmail.com> | 2023-01-23 19:53:12 +0000 |
---|---|---|
committer | Jonathan Davies <jpds@protonmail.com> | 2023-01-26 11:13:11 +0000 |
commit | b4a1a6a32f3581bdf1ac673066ef3b4ebd0a2fdc (patch) | |
tree | 0822d1e72e78092636f2176c9d30c4637af668a6 | |
parent | bcac889f9ad7dc73b655912cfaadd5289fe714f4 (diff) | |
download | garage-b4a1a6a32f3581bdf1ac673066ef3b4ebd0a2fdc.tar.gz garage-b4a1a6a32f3581bdf1ac673066ef3b4ebd0a2fdc.zip |
util/time.rs: Updated deprecated associated function to timestamp_opt().
-rw-r--r-- | src/util/time.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/time.rs b/src/util/time.rs index 257b4d2a..42f41a44 100644 --- a/src/util/time.rs +++ b/src/util/time.rs @@ -25,6 +25,6 @@ pub fn increment_logical_clock_2(prev: u64, prev2: u64) -> u64 { pub fn msec_to_rfc3339(msecs: u64) -> String { let secs = msecs as i64 / 1000; let nanos = (msecs as i64 % 1000) as u32 * 1_000_000; - let timestamp = Utc.timestamp(secs, nanos); + let timestamp = Utc.timestamp_opt(secs, nanos).unwrap(); timestamp.to_rfc3339_opts(SecondsFormat::Millis, true) } |