aboutsummaryrefslogtreecommitdiff
path: root/src/util/time.rs
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2023-01-26 15:17:09 +0000
committerAlex <alex@adnab.me>2023-01-26 15:17:09 +0000
commit5fb383fe4c248181e27df12a57849886e50bacb7 (patch)
tree004e5b3649dd01843b00922e0f5266a1973c0d18 /src/util/time.rs
parent1311742fe07ca619d1f37f9f1eabd07ee0d141db (diff)
parent0da054194b7e063b09f1354bcde739247725688b (diff)
downloadgarage-5fb383fe4c248181e27df12a57849886e50bacb7.tar.gz
garage-5fb383fe4c248181e27df12a57849886e50bacb7.zip
Merge pull request 'cargo: Bump dependencies to latest version' (#484) from jpds/garage:cargo-bumps into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/484
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)
}