We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fcf1e2 commit 75054e4Copy full SHA for 75054e4
postgres-types/src/chrono_04.rs
@@ -40,7 +40,7 @@ impl ToSql for NaiveDateTime {
40
impl<'a> FromSql<'a> for DateTime<Utc> {
41
fn from_sql(type_: &Type, raw: &[u8]) -> Result<DateTime<Utc>, Box<dyn Error + Sync + Send>> {
42
let naive = NaiveDateTime::from_sql(type_, raw)?;
43
- Ok(DateTime::from_utc(naive, Utc))
+ Ok(Utc::from_utc_datetime(naive))
44
}
45
46
accepts!(TIMESTAMPTZ);
0 commit comments