aboutsummaryrefslogtreecommitdiff
path: root/src/util/time.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-01-26 16:46:40 +0100
committerAlex Auvolat <alex@adnab.me>2023-01-26 16:46:40 +0100
commit590a0a84505c0bee8ddd8fcd8de6f340319da097 (patch)
tree14009c0feea6c27cdf36fe85a21dc22753da8653 /src/util/time.rs
parentdac254a6e7413498df0e3b626769c2d2be3a4cfb (diff)
parent611792ddcf86f0a728e22abaa6e172d3679d5ca6 (diff)
downloadgarage-590a0a84505c0bee8ddd8fcd8de6f340319da097.tar.gz
garage-590a0a84505c0bee8ddd8fcd8de6f340319da097.zip
Merge branch 'main' into k2v-watch-range-2
Diffstat (limited to 'src/util/time.rs')
-rw-r--r--src/util/time.rs2
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)
}