This commit is contained in:
Steven Fackler 2022-07-05 07:26:32 -04:00
parent 4ab11d59d3
commit db4c65e884
No known key found for this signature in database
GPG Key ID: 30A04EB23B15B465

View File

@ -700,7 +700,7 @@ impl<'a> FromSql<'a> for SystemTime {
let epoch = UNIX_EPOCH + Duration::from_secs(TIME_SEC_CONVERSION);
let negative = time < 0;
let time = time.abs() as u64;
let time = time.unsigned_abs();
let secs = time / USEC_PER_SEC;
let nsec = (time % USEC_PER_SEC) * NSEC_PER_USEC;