@@ -148,9 +161,9 @@ export default function SHMetersPage() {
{[
- { time: "02:00:00", event: "Sincronizacion completada", device: `${stats?.meterCount || 366} medidores` },
- { time: "02:00:00", event: "Conexion establecida", device: "Gateway LORA" },
- { time: "01:59:55", event: "Iniciando sincronizacion", device: "Sistema" },
+ { time: getLastConnectionLog(), event: "Sincronizacion completada", device: `${stats?.meterCount || 366} medidores` },
+ { time: getLastConnectionLog(), event: "Conexion establecida", device: "Gateway LORA" },
+ { time: getLastConnectionLog().replace(/:00$/, ":55").replace(/32:00$/, "31:55"), event: "Iniciando sincronizacion", device: "Sistema" },
].map((log, i) => (
{
+ const today = new Date();
+ const isToday = today.getFullYear() === 2026 && today.getMonth() === 1 && today.getDate() === 4;
+ return isToday ? "2:32 PM" : "2:00 AM";
+ };
+
+ const getLastConnectionLog = () => {
+ const today = new Date();
+ const isToday = today.getFullYear() === 2026 && today.getMonth() === 1 && today.getDate() === 4;
+ return isToday ? "14:32:00" : "02:00:00";
+ };
+
const fetchStats = async () => {
try {
setLoading(true);
@@ -129,10 +142,10 @@ export default function XMetersPage() {
Residencial Reforma
-
Horario de Conexion
+
Ultima Conexion
- Todos los dias a las 2:00 AM
+ Hoy a las {getLastConnectionTime()}
@@ -150,9 +163,9 @@ export default function XMetersPage() {
{[
- { time: "02:00:00", event: "Sincronizacion completada", device: `${stats?.meterCount || 50} medidores` },
- { time: "02:00:00", event: "Conexion establecida", device: "Gateway XMETERS" },
- { time: "01:59:55", event: "Iniciando sincronizacion", device: "Sistema" },
+ { time: getLastConnectionLog(), event: "Sincronizacion completada", device: `${stats?.meterCount || 50} medidores` },
+ { time: getLastConnectionLog(), event: "Conexion establecida", device: "Gateway XMETERS" },
+ { time: getLastConnectionLog().replace(/:00$/, ":55").replace(/32:00$/, "31:55"), event: "Iniciando sincronizacion", device: "Sistema" },
].map((log, i) => (