From 9dfec852932527d72de840a5e7c5aced95a7b30f Mon Sep 17 00:00:00 2001 From: Fernando Davila Date: Fri, 9 Oct 2026 11:39:52 -0600 Subject: [PATCH] =?UTF-8?q?fix(inicio):=20la=20fecha=20de=20hoy=20en=20hor?= =?UTF-8?q?a=20de=20M=C3=A9xico?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit El calendario regulatorio calcula "faltan N días" con app.fechas.hoy() en lugar de date.today() (hora del servidor, UTC): de 18:00 a 24:00 en Ciudad de México ya contaba un día menos. --- app/routers/inicio.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/routers/inicio.py b/app/routers/inicio.py index 6273ee2..f2cdde3 100644 --- a/app/routers/inicio.py +++ b/app/routers/inicio.py @@ -5,14 +5,13 @@ Los textos salen de `app/textos.py`; el umbral de aviso, del parámetro `factor_ A-01 vigente por la UMA del tenant. """ -from datetime import date from typing import Annotated from fastapi import APIRouter, Depends, Request from sqlalchemy.orm import Session from starlette.responses import HTMLResponse -from app import textos +from app import fechas, textos from app.db import get_db from app.engine.aggregates import inicio_ventana from app.routers import render @@ -39,6 +38,6 @@ def inicio(request: Request, db: Annotated[Session, Depends(get_db)]) -> HTMLRes { "marco": marco, "inicio_ventana": inicio_ventana(marco.fecha_corte, marco.ventana_meses), - "hoy": date.today(), + "hoy": fechas.hoy(), # hora de México: "faltan N días" no cambia a las 18:00 }, )