Skip to content

Commit

Permalink
Merge pull request #153 from sgaynetdinov/master
Browse files Browse the repository at this point in the history
Fix  "datetime.fromtimestamp(unix_time)" (closed #152)
  • Loading branch information
sarumont authored Aug 18, 2016
2 parents 3dba291 + f642144 commit 953eae2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions trello/card.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
from __future__ import with_statement, print_function, absolute_import
from dateutil import parser as dateparser
from datetime import datetime

from trello.organization import Organization
from trello.compat import force_str
Expand Down Expand Up @@ -137,7 +136,9 @@ def from_json(cls, parent, json_obj):
card.idMembers = json_obj['idMembers']
card.member_ids = json_obj['idMembers']
card.idLabels = json_obj['idLabels']
card.idBoard = json_obj['idBoard']
card.idList = json_obj['idList']
card.idShort = json_obj['idShort']
card.labels = Label.from_json_list(card.board, json_obj['labels'])
card.dateLastActivity = dateparser.parse(json_obj['dateLastActivity'])
return card
Expand Down Expand Up @@ -445,7 +446,7 @@ def card_created_date(self):
"""
unix_time = int(self.id[:8], 16)

return datetime.fromtimestamp(unix_time)
return datetime.datetime.fromtimestamp(unix_time)

@property
def due_date(self):
Expand Down

0 comments on commit 953eae2

Please sign in to comment.