Booking in different timezones

Hello Bubblers,
I have a question that’s giving me a headache. I’m mentoring on a project that allows online bookings for accommodations located in different timezones. I have several calendars:

  1. A calendar on the booking page so a customer can make a reservation.
  2. A calendar in the back office for managers in each area to manage their bookings, cleaning schedules, etc.

I’m working with 5 different timezones, and I’m encountering quite a few issues.
If I base everything on the Current User’s timezone (on the page), the bookings might shift by one or two days compared to a customer who booked for the same location but from a different timezone.
The date generator doesn’t take timezones as a parameter. So sometimes, my date generator starts on a Tuesday, and my entire calendar gets completely offset.

Ideally, I would like to save each booking at a time set according to the timezone of the location. I can’t have a dynamic timezone on my booking page, so the solution would be to create a booking page per timezone and redirect to the correct page depending on the location? Not very clean…

Alternatively, I was thinking of setting and fixing the whole application to UTC, recording the difference from the location to UTC, and adjusting the display accordingly?

Anyway, I’m kind of going in circles here, and I would love to get some feedback from people who have faced similar issues!

The best way to deal with bookings is to ignore local time zones completely (they’re not relevant here) and keep all dates in UTC.

All dates should be set/defined in UTC, and displayed in UTC.

2 Likes

I vouch this approach.

1 Like