fix: eliminar espacios en horas de Firebird en fechaHoraIngreso/Egreso/Realizacion
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
dd4d012a4b
commit
c5d6b9857e
@@ -17,13 +17,16 @@ def _fmt_fecha(val) -> str:
|
|||||||
return s
|
return s
|
||||||
|
|
||||||
|
|
||||||
|
def _clean_time(s: str) -> str:
|
||||||
|
return s.replace(": ", ":").replace(" :", ":")
|
||||||
|
|
||||||
|
|
||||||
def _fmt_datetime(val) -> str:
|
def _fmt_datetime(val) -> str:
|
||||||
if not val:
|
if not val:
|
||||||
return ""
|
return ""
|
||||||
if hasattr(val, "strftime"):
|
if hasattr(val, "strftime"):
|
||||||
return val.strftime("%d/%m/%Y %H:%M:%S")
|
return _clean_time(val.strftime("%d/%m/%Y %H:%M:%S"))
|
||||||
# Eliminar espacios dentro de la hora ANTES de truncar ("06: 59: 28" → "06:59:28")
|
s = _clean_time(str(val))
|
||||||
s = str(val).replace(": ", ":").replace(" :", ":")
|
|
||||||
s = s[:19].replace("T", " ")
|
s = s[:19].replace("T", " ")
|
||||||
parts = s.split(" ")
|
parts = s.split(" ")
|
||||||
if len(parts) == 2:
|
if len(parts) == 2:
|
||||||
|
|||||||
Reference in New Issue
Block a user