# Timezone fix

This build fixes a date mismatch between the employee dashboard and MySQL around midnight in India.

## What was wrong

The employee dashboard used the app timezone (`Asia/Kolkata`) to determine today's date, while Clock In and the admin dashboard used MySQL `CURDATE()`. On MySQL servers configured as UTC, between 00:00 and 05:29 IST those two dates are different.

## What changed

- Attendance date is now explicitly supplied by Node.js using `Asia/Kolkata`.
- Admin live dashboard uses the same application date.
- Attendance/break timestamps use `DATE_ADD(UTC_TIMESTAMP(), INTERVAL 330 MINUTE)` so they are stored consistently in IST even when the MySQL server runs in UTC.
- Open-session duration calculations use the same IST database expression.

## Existing test row

If an employee is already stuck as Working from the old code, remove only that employee's open test session after deploying this build, then clock in again:

```sql
SELECT id, name, email FROM users;

DELETE FROM attendance_sessions
WHERE user_id = YOUR_USER_ID
  AND clock_out IS NULL;
```

`activity_breaks` linked to that attendance row will be removed automatically by the foreign key cascade.
