From c310b16a803dae02a45a93303b2864bd7bc97696 Mon Sep 17 00:00:00 2001 From: jnozsc Date: Sat, 16 Sep 2017 14:02:36 -0700 Subject: [PATCH] add a try catch --- jrnl/DayOneJournal.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jrnl/DayOneJournal.py b/jrnl/DayOneJournal.py index cf246a90..06e8b611 100644 --- a/jrnl/DayOneJournal.py +++ b/jrnl/DayOneJournal.py @@ -43,7 +43,11 @@ 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: + #(TODO) is_dst issue + pass raw = dict_entry['Entry Text'] sep = re.search("\n|[\?!.]+ +\n?", raw) title, body = (raw[:sep.end()], raw[sep.end():]) if sep else (raw, "")