From 6d8c403a8ddd98c3af12d79670fe6450cbb56d81 Mon Sep 17 00:00:00 2001 From: Aaron Loucks Date: Fri, 28 Feb 2020 19:52:20 -0500 Subject: [PATCH] OffsetDateTime now only supports TIMESTAMPZ --- postgres-types/src/lib.rs | 4 ++-- postgres-types/src/time_02.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/postgres-types/src/lib.rs b/postgres-types/src/lib.rs index 88ab298d..1479c126 100644 --- a/postgres-types/src/lib.rs +++ b/postgres-types/src/lib.rs @@ -398,7 +398,7 @@ impl WrongType { /// | `chrono::NaiveDate` | DATE | /// | `chrono::NaiveTime` | TIME | /// | `time::PrimitiveDateTime` | TIMESTAMP | -/// | `time::OffsetDateTime` | TIMESTAMP, TIMESTAMP WITH TIME ZONE | +/// | `time::OffsetDateTime` | TIMESTAMP WITH TIME ZONE | /// | `time::Date` | DATE | /// | `time::Time` | TIME | /// | `eui48::MacAddress` | MACADDR | @@ -661,7 +661,7 @@ pub enum IsNull { /// | `chrono::NaiveDate` | DATE | /// | `chrono::NaiveTime` | TIME | /// | `time::PrimitiveDateTime` | TIMESTAMP | -/// | `time::OffsetDateTime` | TIMESTAMP, TIMESTAMP WITH TIME ZONE | +/// | `time::OffsetDateTime` | TIMESTAMP WITH TIME ZONE | /// | `time::Date` | DATE | /// | `time::Time` | TIME | /// | `eui48::MacAddress` | MACADDR | diff --git a/postgres-types/src/time_02.rs b/postgres-types/src/time_02.rs index ce80267c..19a8909e 100644 --- a/postgres-types/src/time_02.rs +++ b/postgres-types/src/time_02.rs @@ -40,7 +40,7 @@ impl<'a> FromSql<'a> for OffsetDateTime { Ok(primitive.assume_utc()) } - accepts!(TIMESTAMP, TIMESTAMPTZ); + accepts!(TIMESTAMPTZ); } impl ToSql for OffsetDateTime { @@ -56,7 +56,7 @@ impl ToSql for OffsetDateTime { primitive.to_sql(type_, w) } - accepts!(TIMESTAMP, TIMESTAMPTZ); + accepts!(TIMESTAMPTZ); to_sql_checked!(); }