Skip to content

Commit

Permalink
Card and timezone configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
diegojromerolopez committed Apr 21, 2016
1 parent a3006a5 commit d824836
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trello/card.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from dateutil import parser as dateparser
from trello.checklist import Checklist
from trello.label import Label
from trello.organization import Organization
from trello.configuration import Configuration

import datetime
import pytz
Expand Down Expand Up @@ -411,7 +411,7 @@ def create_date(self):
test for the condition.
"""
if not hasattr(self, "creation_date"):
localtz = pytz.timezone(Organization.TIMEZONE)
localtz = pytz.timezone(Configuration.TIMEZONE)
self.creation_date = localtz.localize(datetime.datetime.fromtimestamp(int(self.id[0: 8], 16)))
return self.creation_date

Expand Down
7 changes: 7 additions & 0 deletions trello/configuration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-

# Contains all the common configuration preferences
# Only timezone by now
class Configuration(object):
# Timezone of the team
TIMEZONE = None

0 comments on commit d824836

Please sign in to comment.