I observed same behaviour with read_database but do not have a minimal example (was using psycopg2 / Postgres).
Log output
No response
Issue description
When using read_csv or read_database with the schema parameter to define a column as datetime with a timezone, the function incorrectly assumes that naive datetime values are in UTC. It then converts these UTC values to the specified timezone, changing the actual datetime values.
Expected behavior
Naive datetime values should retain their original time, and the specified timezone from given schema should be applied without conversion. Same way to_datetime works:
Checks
Reproducible example
I observed same behaviour with
read_database
but do not have a minimal example (was using psycopg2 / Postgres).Log output
No response
Issue description
When using read_csv or read_database with the schema parameter to define a column as datetime with a timezone, the function incorrectly assumes that naive datetime values are in UTC. It then converts these UTC values to the specified timezone, changing the actual datetime values.
Expected behavior
Naive datetime values should retain their original time, and the specified timezone from given schema should be applied without conversion. Same way
to_datetime
works:Installed versions