# Attendance time and location

Employee times use the effective attendance-policy timezone. UTC punch timestamps remain authoritative; changing a device clock does not change attendance. Configure host NTP/time synchronization with the hosting provider. Attendance Settings includes timezone and HTTPS diagnostics; it does not independently verify clock synchronization.

## Company setup

1. In Attendance Settings, create an effective policy version for the desired company/organizational scope.
2. Choose Location policy: Off, Capture location, or Office geofencing. Leaving it blank preserves inherited rules.
3. For office geofencing, create active assigned work locations with a verified address, coordinates, radius and accuracy limit. Use “Use my current location” while at the office to fill the centre. Assignment follows effective employee department/position scope.
4. Choose Block outside office, Allow outside and flag for review, or the existing remote-work policy. Review applicable overrides and legacy shift boundaries, which remain enforced.
5. Test on an HTTPS address with a real device. Permission denial, location timeout or poor accuracy is shown explicitly. Continue without location is available only when company rules permit it. Strict boundaries are validated on the backend.

Location capture occurs only for an intentional punch; there is no continuous tracking. Off requests no GPS. Original punches without coordinates remain Location not recorded. Browser GPS may be inaccurate or altered and is supporting evidence, not proof of presence. Desktop accuracy can be worse than mobile GPS. Encrypted evidence follows the existing retention policy (30 days by default).

## Approximate place names

Within an assigned office boundary, show its configured name/address. Elsewhere use the included offline GeoNames area dataset and show “Near …”. Area names are not exact street addresses. Address lookup failure never prevents a valid punch. No new map or geolocation package is installed.

Optional street lookup requires platform-operator setup, not an employee-supplied URL:

```dotenv
ATTENDANCE_GEOCODING_ENABLED=true
ATTENDANCE_GEOCODING_ENDPOINT=https://your-trusted-geocoder.example/reverse
ATTENDANCE_GEOCODING_TOKEN=
ATTENDANCE_GEOCODING_ATTRIBUTION="© OpenStreetMap contributors"
```

The endpoint must support Nominatim-compatible JSONv2 responses with display_name. HTTPS is required, redirects are disabled, and the public nominatim.openstreetmap.org endpoint is not used. Select a provider/self-hosted deployment with suitable privacy terms and any required attribution; the built-in UI always labels the result approximate. Enabling this sends rounded coordinates to that configured provider. Exact street/building coverage is not guaranteed. Credentials stay in backend configuration. Cache entries are tenant-isolated, encrypted, and expire after ten minutes. Requests are globally limited to one per second per endpoint, with a two-second timeout and offline fallback. Do not enable coordinate-bearing HTTP request tracing on this endpoint.

After updating configuration, run `php artisan config:cache`. No database migration is required for this update. Deploy the matching compiled assets with the application. Existing companies retain their settings until explicitly changed.
