mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-18 12:08:31 +02:00
add a try catch
This commit is contained in:
parent
12647bc0bd
commit
c310b16a80
1 changed files with 5 additions and 1 deletions
|
@ -43,7 +43,11 @@ class DayOne(Journal.Journal):
|
|||
except (KeyError, pytz.exceptions.UnknownTimeZoneError):
|
||||
timezone = tzlocal.get_localzone()
|
||||
date = dict_entry['Creation Date']
|
||||
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, "")
|
||||
|
|
Loading…
Add table
Reference in a new issue