fix: dashboard attendance — format arrived_at as HH:MM matching PHP
Was using toISOString() which outputs UTC time. Now formats with getHours/getMinutes (local time via TZ=Europe/Prague), outputting "07:45" instead of "2026-03-24T06:45:00.000Z". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -76,7 +76,7 @@ export default async function dashboardRoutes(fastify: FastifyInstance): Promise
|
||||
name: `${user.first_name} ${user.last_name}`,
|
||||
initials: `${firstInitial}${lastInitial}`.toUpperCase(),
|
||||
status,
|
||||
arrived_at: a.arrival_time ? a.arrival_time.toISOString() : null,
|
||||
arrived_at: a.arrival_time ? `${String(a.arrival_time.getHours()).padStart(2, '0')}:${String(a.arrival_time.getMinutes()).padStart(2, '0')}` : null,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user