mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
simplify date parsing
and remove some whitespace
This commit is contained in:
parent
8404dcc928
commit
b877822883
1 changed files with 3 additions and 3 deletions
2
jrnl.py
2
jrnl.py
|
@ -175,7 +175,7 @@ class Journal:
|
||||||
for line in journal.split(os.linesep):
|
for line in journal.split(os.linesep):
|
||||||
if line:
|
if line:
|
||||||
try:
|
try:
|
||||||
new_date = datetime.fromtimestamp(time.mktime(time.strptime(line[:date_length], self.config['timeformat'])))
|
new_date = datetime.strptime(line[:date_length], self.config['timeformat'])
|
||||||
# make a journal entry of the current stuff first
|
# make a journal entry of the current stuff first
|
||||||
if new_date and current_entry:
|
if new_date and current_entry:
|
||||||
entries.append(current_entry)
|
entries.append(current_entry)
|
||||||
|
|
Loading…
Add table
Reference in a new issue