Skip to content

Commit

Permalink
Merge ead2761 into 5121e3f
Browse files Browse the repository at this point in the history
  • Loading branch information
kglowinski committed Jan 5, 2017
2 parents 5121e3f + ead2761 commit e847ffb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions zipline/data/us_equity_pricing.py
Expand Up @@ -1351,13 +1351,16 @@ def unpack_db_to_component_dfs(self, convert_dates=False):

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,
Expand Down

0 comments on commit e847ffb

Please sign in to comment.