Return in case of higher precision than expected

This commit is contained in:
William Tisäter
2015-05-06 17:32:00 +02:00
parent f7bb72e9ce
commit d0f96ff213
2 changed files with 4 additions and 2 deletions

View File

@ -61,8 +61,7 @@ def DateTime_or_None(s):
# 12:00:00.123456
micros = int(micros) * 10 ** (6 - len(micros))
else:
# 12:00:00.123456789
micros = int(micros)
return None
return datetime(
int(s[:4]), # year