Fix - En fechas
This commit is contained in:
parent
c655a3c8a1
commit
8a51fd72b0
|
@ -129,9 +129,9 @@ def _to_date(str_date, end=False):
|
|||
try:
|
||||
parts = str_date.split('-')
|
||||
if end:
|
||||
dt = datetime(parts[0], parts[1], parts[2], 23, 59, 59)
|
||||
dt = datetime(int(parts[0]), int(parts[1]), int(parts[2]), 23, 59, 59)
|
||||
else:
|
||||
dt = datetime(parts[0], parts[1], parts[2], 0, 0, 0)
|
||||
dt = datetime(int(parts[0]), int(parts[1]), int(parts[2]), 0, 0, 0)
|
||||
except Exception as e:
|
||||
error = 'Fecha inválida'
|
||||
|
||||
|
|
Loading…
Reference in New Issue