Skip to content

Commit 3c46585

Browse files
author
Jeroen van der Heijden
committed
correction datetime/timeval
1 parent 19be774 commit 3c46585

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

thingsdb/model/proptypes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ def str_(v):
8484
def utf8_(v):
8585
if not isinstance(v, str):
8686
raise TypeError(f'expecting type `str`, got `{type(v)}`')
87-
timestamp, _offset, _tz_idx = v['\'']
88-
return datetime.fromtimestamp(timestamp)
87+
return v
8988

9089
@staticmethod
9190
def datetime_(v):
@@ -98,7 +97,8 @@ def datetime_(v):
9897
def timeval_(v):
9998
if not isinstance(v, dict) or not '"' in dict:
10099
raise TypeError(f'expecting type `timeval`, got `{type(v)}`')
101-
return datetime.fromtimestamp(v['\''])
100+
timestamp, _offset, _tz_idx = v['"']
101+
return datetime.fromtimestamptimestamp)
102102

103103
@staticmethod
104104
def bytes_(v):

0 commit comments

Comments
 (0)