You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let dur = st.duration_since(std::time::UNIX_EPOCH).map_err(|e| crate::Error(crate::error::ErrorKind::InvalidSystemTime(e.to_string())))?;
199
+
let dur = st.duration_since(std::time::UNIX_EPOCH).map_err(|_| crate::Error(crate::error::ErrorKind::InvalidSystemTime("unable to convert the system tie into a Unix timestamp")))?;
202
200
203
201
Ok(Self::from_unix_time(
204
202
dur.as_secs(),
@@ -1260,10 +1258,7 @@ mod test_conversion {
1260
1258
fnfrom_system_time_before_epoch(){
1261
1259
let before_epoch = matchSystemTime::UNIX_EPOCH.checked_sub(Duration::from_nanos(1_000)){
1262
1260
Some(st) => st,
1263
-
None => {
1264
-
println!("SystemTime before UNIX_EPOCH is not supported on this platform");
0 commit comments