Skip to content

Commit

Permalink
Fix failing nanosec truncation check on mac OS (#1423)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanji Yomoda authored Jul 25, 2022
1 parent af84e74 commit 931bab8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ pub mod tests {
assert_eq!(dt.to_ordinal_date(), now.to_ordinal_date());
assert_eq!(dt.to_hms_micro(), now.to_hms_micro());
// We don't store nanosecond level precision.
assert_ne!(dt.to_hms_nano(), now.to_hms_nano());
assert_eq!(dt.nanosecond(), now.microsecond() * 1000);

let dt = DateTime::from_timestamp_secs(now.unix_timestamp()).into_utc();
assert_eq!(dt.to_ordinal_date(), now.to_ordinal_date());
Expand Down

0 comments on commit 931bab8

Please sign in to comment.