diff --git a/.travis.yml b/.travis.yml index 37afaca9..3c476bb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ +sudo: false language: python +cache: pip python: - "2.7" - "3.3" diff --git a/jrnl/DayOneJournal.py b/jrnl/DayOneJournal.py index f4365db2..c2fd74fb 100644 --- a/jrnl/DayOneJournal.py +++ b/jrnl/DayOneJournal.py @@ -51,7 +51,13 @@ class DayOne(Journal.Journal): except (KeyError, pytz.exceptions.UnknownTimeZoneError): timezone = tzlocal.get_localzone() date = dict_entry['Creation Date'] - date = date + timezone.utcoffset(date, is_dst=False) + try: + date = date + timezone.utcoffset(date, is_dst=False) + except TypeError: + # if the system timezone is set to UTC, + # pytz.timezone.utcoffset() breaks when given the + # arg `is_dst` + pass entry = Entry.Entry(self, date, text=dict_entry['Entry Text'], starred=dict_entry["Starred"]) entry.uuid = dict_entry["UUID"] entry._tags = [self.config['tagsymbols'][0] + tag.lower() for tag in dict_entry.get("Tags", [])]