BUG: Datetimes should be converted in utc. (#1635)

* BUG: Datetimes should be converted in utc.

* DOC: Making note of UTC req. and moving comment.
This commit is contained in:
Kathryn Glowinski
2017-01-05 14:13:23 -05:00
committed by GitHub
parent c1fe909dde
commit dd560ba5f0
+5 -2
View File
@@ -1351,13 +1351,16 @@ class SQLiteAdjustmentReader(object):
def _get_df_from_table(table_name, date_cols):
# Dates are stored in second resolution as ints in adj.db tables.
# Need to specifically convert them as UTC, not local time.
kwargs = (
{'parse_dates': {col: 's' for col in date_cols}}
{'parse_dates': {col: {'unit': 's', 'utc': True}
for col in date_cols}
}
if convert_dates
else {}
)
# Dates are stored in second resolution as ints in adj.db tables.
return read_sql(
'select * from "{}"'.format(table_name),
self.conn,