Skip to content

Commit

Permalink
https://github.com/kfei/slack-cleaner/pull/30
Browse files Browse the repository at this point in the history
  • Loading branch information
sgratzl committed Sep 8, 2017
1 parent d330eb1 commit a87a3f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion slack_cleaner/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ def __init__(self, start_time, end_time):
def parse_ts(t):
try:
_time = time.mktime(time.strptime(t, "%Y%m%d"))
return str(_time)
if len(t) == 8:
_time = time.mktime(time.strptime(t, "%Y%m%d"))
else:
_time = time.mktime(time.strptime(t, "%Y%m%d%H%M"))
except:
return '0'
self.start_ts = parse_ts(start_time)
Expand Down

0 comments on commit a87a3f0

Please sign in to comment.