From e59df7a5faf1e91b1ce3771c6fd9aee12d8ab602 Mon Sep 17 00:00:00 2001 From: Jose Carlos Vasques Moreira Date: Sun, 11 Aug 2024 22:47:07 -0700 Subject: [PATCH] Using timestamps in nanos since epoch instead of seconds --- src/fluent.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fluent.rs b/src/fluent.rs index b26f1ed..508e396 100644 --- a/src/fluent.rs +++ b/src/fluent.rs @@ -138,7 +138,7 @@ impl fmt::Debug for Value { #[derive(Debug)] ///Representation of fluent entry within `Message` pub struct Record { - time: u64, + time: u128, entries: Map, } @@ -147,7 +147,7 @@ impl Record { ///Creates record with current timestamp pub fn now() -> Self { let time = match std::time::SystemTime::now().duration_since(std::time::SystemTime::UNIX_EPOCH) { - Ok(time) => time.as_secs(), + Ok(time) => time.as_nanos(), Err(_) => panic!("SystemTime is before UNIX!?"), };