Handling appointment booking with patient-selected time zones

Hi everyone,

I’m building a doctor appointment booking app in Bubble.io.
Patients can select their own time zone in account settings, and doctors have fixed working hours. I need the appointment booking flow to work correctly when patients and doctors are in different time zones.

Main requirement:

  1. Available time slots should be displayed correctly based on the patient’s selected time zone
  2. Appointments should be saved correctly so that both:
    the patient sees the correct local time
    the doctor sees the correct time in their own time zone

I’m not sure about the best practice in Bubble for:

  1. Storing appointment date/time (UTC vs local time)
  2. Converting available slots based on the patient’s selected time zone
  3. Avoiding issues with different time zones and daylight saving time

What is the recommended approach for this in Bubble.io?

Thanks a lot :folded_hands:

1 Like

Always store dates using Bubble’s native ‘date’ type … it handles the UTC conversion automatically.

So When you display a date, use the `:formatted as` operator and set the time zone dynamically to the viewing user’s stored IANA time zone ID.

This ensures both the doctor and patient see appointments in their respective local times.

1 Like

Mental model you must follow:

Pick a fixed timezone to store time in db (utc is best)

When you know for a fact that date in db is fixed at a timezone you can display it anyway you like. Selecting utc as fixed in db makes this easy as it is the standard way of doing things

You can implement this as it has everything you need

If you activate this option, won’t it solve the problem?