Skip to content

Commit

Permalink
Workaround a breaking change in chrono
Browse files Browse the repository at this point in the history
  • Loading branch information
weiznich committed Jan 26, 2024
1 parent b6050c5 commit e66d761
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diesel/src/pg/types/date_and_time/chrono.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ mod tests {
let query = select(sql::<Date>("'J0'::date"));
assert_eq!(Ok(julian_epoch), query.get_result::<NaiveDate>(connection));

let max_date = NaiveDate::MAX;
let query = select(sql::<Date>("'262143-12-31'::date"));
let max_date = NaiveDate::from_ymd_opt(262142, 12, 31).unwrap();
let query = select(sql::<Date>("'262142-12-31'::date"));
assert_eq!(Ok(max_date), query.get_result::<NaiveDate>(connection));

let january_first_2018 = NaiveDate::from_ymd_opt(2018, 1, 1).unwrap();
Expand Down

0 comments on commit e66d761

Please sign in to comment.