Skip to content

Commit

Permalink
Merge pull request #106 from th0th/master
Browse files Browse the repository at this point in the history
Disable deleting time zone info of datetime column
  • Loading branch information
xzkostyan committed Sep 13, 2019
2 parents 7f03246 + 438e347 commit 08cc6de
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions clickhouse_driver/columns/datetimecolumn.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ def __init__(self, timezone=None, **kwargs):
super(DateTimeColumn, self).__init__(**kwargs)

def after_read_item(self, value):
dt = datetime.fromtimestamp(value, self.timezone)
return dt.replace(tzinfo=None)
return datetime.fromtimestamp(value, self.timezone)

def before_write_item(self, value):
if isinstance(value, int):
Expand Down

0 comments on commit 08cc6de

Please sign in to comment.