We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b93cccc commit 26c34c7Copy full SHA for 26c34c7
flexify_api/api_client.py
@@ -553,14 +553,18 @@ def __deserialize_object(self, value):
553
return value
554
555
def __deserialize_date(self, string):
556
- """Deserializes string to date.
+ """Deserializes string or millis to date.
557
558
:param string: str.
559
:return: date.
560
"""
561
try:
562
- from dateutil.parser import parse
563
- return parse(string).date()
+ if type(string) == int:
+ import datetime
564
+ return datetime.datetime.fromtimestamp(string / 1e3)
565
+ else:
566
+ from dateutil.parser import parse
567
+ return parse(string).date()
568
except ImportError:
569
return string
570
except ValueError:
0 commit comments