зеркало из https://github.com/mozilla/MozDef.git
minor update to toutc to allow for unicode
This commit is contained in:
Родитель
ed67ab4cab
Коммит
c5bbbc3eaf
|
@ -49,7 +49,7 @@ def toUTC(suspectedDate, localTimeZone="US/Pacific"):
|
||||||
'''make a UTC date out of almost anything'''
|
'''make a UTC date out of almost anything'''
|
||||||
utc = pytz.UTC
|
utc = pytz.UTC
|
||||||
objDate = None
|
objDate = None
|
||||||
if type(suspectedDate) == str:
|
if type(suspectedDate) in (str, unicode):
|
||||||
objDate = parse(suspectedDate, fuzzy=True)
|
objDate = parse(suspectedDate, fuzzy=True)
|
||||||
elif type(suspectedDate) == datetime:
|
elif type(suspectedDate) == datetime:
|
||||||
objDate = suspectedDate
|
objDate = suspectedDate
|
||||||
|
|
Загрузка…
Ссылка в новой задаче