Timezone management #2

Closed
opened 2026-02-07 15:27:05 -08:00 by kyle · 1 comment
Owner

Although we are operating across many different time zones at the moment for managing movements, we will want to try and keep it relative to the location of the server. We would want to have the option to set the relative time zone for the app. And then also when something is done, like a movement or a schedule change, we will want it to be done in the relative time zone. Put the time zone selection in the Admin Tools menu. This will be good for the GPS tracking as well. We get the data from where the user is, but we will want to do the math to keep it relative to where the server time is set. I don't want to set the time myself, just the zone of where the app is. (like if it is hosted on a server in NYC, I don't mind if it is, but if I have an event with relative time in Los Angeles I'd like to be able to set that.)

Although we are operating across many different time zones at the moment for managing movements, we will want to try and keep it relative to the location of the server. We would want to have the option to set the relative time zone for the app. And then also when something is done, like a movement or a schedule change, we will want it to be done in the relative time zone. Put the time zone selection in the Admin Tools menu. This will be good for the GPS tracking as well. We get the data from where the user is, but we will want to do the math to keep it relative to where the server time is set. I don't want to set the time myself, just the zone of where the app is. (like if it is hosted on a server in NYC, I don't mind if it is, but if I have an event with relative time in Los Angeles I'd like to be able to set that.)
Author
Owner

Implemented and deployed!

Changes:

  • Backend: Added GET /settings/timezone (all users) and PATCH /settings/timezone (admin-only) endpoints
  • Frontend: Created TimezoneContext + useFormattedDate hook for app-wide timezone support
  • Admin Tools: Added prominent "App Timezone" section with dropdown (14 common timezones)
  • Updated ALL date/time formatting across 14 components to use the configured timezone:
    • CommandCenter (clock, event times, arrival times)
    • Dashboard, EventList, FlightList
    • FlightCard, FlightProgressBar
    • DriverScheduleModal, DriverChatModal
    • MySchedule, VIPSchedule, DriverProfile, UserList
    • EventForm, InlineDriverSelector

Uses native Intl.DateTimeFormat with timeZone option - no additional libraries needed.
Timezone stored in existing PdfSettings model (reuses timezone field).

Implemented and deployed! **Changes:** - Backend: Added `GET /settings/timezone` (all users) and `PATCH /settings/timezone` (admin-only) endpoints - Frontend: Created TimezoneContext + useFormattedDate hook for app-wide timezone support - Admin Tools: Added prominent "App Timezone" section with dropdown (14 common timezones) - Updated ALL date/time formatting across 14 components to use the configured timezone: - CommandCenter (clock, event times, arrival times) - Dashboard, EventList, FlightList - FlightCard, FlightProgressBar - DriverScheduleModal, DriverChatModal - MySchedule, VIPSchedule, DriverProfile, UserList - EventForm, InlineDriverSelector Uses native `Intl.DateTimeFormat` with `timeZone` option - no additional libraries needed. Timezone stored in existing PdfSettings model (reuses `timezone` field).
kyle closed this issue 2026-02-07 22:10:18 -08:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kyle/vip-coordinator#2