Remove colons from date string so Python 3.5 can parse
This commit is contained in:
parent
c9fb9bd5df
commit
3ff917e806
|
@ -44,7 +44,8 @@ def feed():
|
|||
return [x['short_id'] for x in api(API_HOTTEST) or []]
|
||||
|
||||
def unix(date_str):
|
||||
return int(datetime.strptime(date_str, '%Y-%m-%dT%H:%M:%S.%f%z').timestamp())
|
||||
date_str = date_str.replace(':', '')
|
||||
return int(datetime.strptime(date_str, '%Y-%m-%dT%H%M%S.%f%z').timestamp())
|
||||
|
||||
def make_comment(i):
|
||||
c = {}
|
||||
|
|
Loading…
Reference in New Issue
Block a user