mirror of
https://github.com/Infinidat/infi.clickhouse_orm.git
synced 2024-11-11 03:46:34 +03:00
Fix bug in datetime parsing
This commit is contained in:
parent
c6c9f13e51
commit
9489115d6e
|
@ -97,7 +97,7 @@ class DateTimeField(Field):
|
|||
if isinstance(value, int):
|
||||
return datetime.datetime.fromtimestamp(value, pytz.utc)
|
||||
if isinstance(value, basestring):
|
||||
return datetime.datetime.strptime(value, '%Y-%m-%d %H-%M-%S')
|
||||
return datetime.datetime.strptime(value, '%Y-%m-%d %H:%M:%S')
|
||||
raise ValueError('Invalid value for %s - %r' % (self.__class__.__name__, value))
|
||||
|
||||
def get_db_prep_value(self, value):
|
||||
|
|
Loading…
Reference in New Issue
Block a user