Tests for fedireads connector
This commit is contained in:
parent
d5f46a1c6f
commit
7493abeb53
8 changed files with 1179 additions and 2 deletions
|
@ -284,8 +284,14 @@ def get_date(date_string):
|
|||
''' helper function to try to interpret dates '''
|
||||
if not date_string:
|
||||
return None
|
||||
|
||||
try:
|
||||
return pytz.utc.localize(parser.parse(date_string))
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
try:
|
||||
return parser.parse(date_string)
|
||||
except ValueError:
|
||||
return None
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue