Pandas: ENH/SQL: support writing timestamps with timezone in to_sql

Created on 15 Dec 2014  路  2Comments  路  Source: pandas-dev/pandas

This currently works a bit for datetime values in the index (not in the columns, reason for this is that is then are object columns: #9085).
I say 'a bit', as it does give a 'timestamp with time zone' type (example for postgresql), but it is the time localized in your local timezone (I suppose because this is the way numpy works on input/output of datetimes).

In any case, also the code here (https://github.com/pydata/pandas/blob/v0.15.2/pandas/io/sql.py#L916) is not working (as columns never have a tzinfo attribute), and there are also no tests for this.

So in practice, timezones are not yet supported.

Enhancement IO SQL Timezones

Most helpful comment

Hi,
any update on the timezone issue?

All 2 comments

Hi,
any update on the timezone issue?

Also curious for updates!

Was this page helpful?
0 / 5 - 0 ratings