Open xtexChooser opened 5 months ago
I see, but sadly in Entity definition there is no way to know whether it is MySQL or Postgres. MySQL does not have timestamptz. But I do think we can specifically convert Timestamp to DateTime<Utc>
on the MySQL connector (it's the same data with a different type hint, afterall).
PR would be appreciated.
As the document:
DateTimeUtc
should be regarded as Timestamp, however, it is regarded as TimestampWithTimeZoneFrom the following Model:
I can get this error:
Query Error: error occurred while decoding column \"col\": mismatched types; Rust type core::option::Option<chrono::datetime::DateTime<chrono::offset::utc::Utc>> (as SQL type TIMESTAMPTZ) is not compatible with SQL type TIMESTAMP
On PostgresQL, TIMESTAMP is the same as DATETIME.
col
, which is with Timestamp column type, should be decoded as the same asDateTime
. However the current behaviour should be kept when using with MySQL.