Skip to content

Commit

Permalink
Extend test to more distant dates
Browse files Browse the repository at this point in the history
  • Loading branch information
pitdicker committed Feb 10, 2024
1 parent 7fdd17f commit 38edc49
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/offset/local/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,7 @@ mod tests {

#[test]
fn verify_correct_offsets_distant_past() {
// let distant_past = Local::now() - TimeDelta::days(365 * 100);
let distant_past = Local::now() - TimeDelta::days(250 * 31);
let distant_past = Local::now() - TimeDelta::days(365 * 500);
let from_local = Local.from_local_datetime(&distant_past.naive_local()).unwrap();
let from_utc = Local.from_utc_datetime(&distant_past.naive_utc());

Expand All @@ -306,7 +305,7 @@ mod tests {

#[test]
fn verify_correct_offsets_distant_future() {
let distant_future = Local::now() + TimeDelta::days(250 * 31);
let distant_future = Local::now() + TimeDelta::days(365 * 35000);
let from_local = Local.from_local_datetime(&distant_future.naive_local()).unwrap();
let from_utc = Local.from_utc_datetime(&distant_future.naive_utc());

Expand Down

0 comments on commit 38edc49

Please sign in to comment.