strange issue

This commit is contained in:
jnozsc 2017-09-16 13:27:41 -07:00
parent 12a5c28cf6
commit eb490c9ede
2 changed files with 1 additions and 2 deletions

View file

@ -12,7 +12,6 @@ install:
- "pip install -e ." - "pip install -e ."
- "pip install pycryptodome>=3.4.5" - "pip install pycryptodome>=3.4.5"
- "pip install -q behave" - "pip install -q behave"
- "pip install pytz"
# command to run tests # command to run tests
script: script:
- python --version - python --version

View file

@ -43,7 +43,7 @@ class DayOne(Journal.Journal):
except (KeyError, pytz.exceptions.UnknownTimeZoneError): except (KeyError, pytz.exceptions.UnknownTimeZoneError):
timezone = tzlocal.get_localzone() timezone = tzlocal.get_localzone()
date = dict_entry['Creation Date'] date = dict_entry['Creation Date']
date = date + timezone.utcoffset(date, is_dst=False) date = date + timezone.utcoffset(date)
raw = dict_entry['Entry Text'] raw = dict_entry['Entry Text']
sep = re.search("\n|[\?!.]+ +\n?", raw) sep = re.search("\n|[\?!.]+ +\n?", raw)
title, body = (raw[:sep.end()], raw[sep.end():]) if sep else (raw, "") title, body = (raw[:sep.end()], raw[sep.end():]) if sep else (raw, "")