Skip to content

Commit

Permalink
deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
conradludgate committed Oct 19, 2023
1 parent c0b5882 commit 7434d93
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tokio-postgres/tests/test/types/chrono_04.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use chrono_04::{DateTime, NaiveDate, NaiveDateTime, NaiveTime, TimeZone, Utc};
use chrono_04::{DateTime, NaiveDate, NaiveDateTime, NaiveTime, Utc};
use std::fmt;
use tokio_postgres::types::{Date, FromSqlOwned, Timestamp};
use tokio_postgres::Client;
Expand Down Expand Up @@ -53,10 +53,10 @@ async fn test_with_special_naive_date_time_params() {
async fn test_date_time_params() {
fn make_check(time: &str) -> (Option<DateTime<Utc>>, &str) {
(
Some(
Utc.datetime_from_str(time, "'%Y-%m-%d %H:%M:%S.%f'")
.unwrap(),
),
Some(DateTime::from_naive_utc_and_offset(
NaiveDateTime::parse_from_str(time, "'%Y-%m-%d %H:%M:%S.%f'").unwrap(),
Utc,
)),
time,
)
}
Expand All @@ -76,10 +76,10 @@ async fn test_date_time_params() {
async fn test_with_special_date_time_params() {
fn make_check(time: &str) -> (Timestamp<DateTime<Utc>>, &str) {
(
Timestamp::Value(
Utc.datetime_from_str(time, "'%Y-%m-%d %H:%M:%S.%f'")
.unwrap(),
),
Timestamp::Value(DateTime::from_naive_utc_and_offset(
NaiveDateTime::parse_from_str(time, "'%Y-%m-%d %H:%M:%S.%f'").unwrap(),
Utc,
)),
time,
)
}
Expand Down

0 comments on commit 7434d93

Please sign in to comment.