Account for time zone change in automatic slot selection

Issue #761 resolved
Wacław Jacek created an issue

This is an enhancement proposal created based on my forum post here: https://bookingwp.com/forums/topic/account-for-time-zone-change-in-automatic-slot-selection/


The desired behavior

  1. Let’s say I select a 3:00 PM time slot and my current timezone is UTC.
  2. When I change my timezone to UTC+01, the selected slot should be 4:00 PM (in other words, the very same time slot after converting the time to the new timezone).

Current behavior

It seems that at the moment the way WooCommerce Appointments handles timezone changes as follows (after a quick test and glance at the code):

  1. Let’s say I select a 3:00 PM time slot and my current timezone is UTC.
  2. When I change my timezone to UTC+01, keep the slot labeled “3:00 PM” selected if it is available.
  3. If the 3:00 PM slot is not available in the new timezone, fall back to a default slot (this seems to be whatever earliest slot is available, maybe additionally including some extra logic, such as selecting slots from other days etc.)

I wanted to ask if maybe what my client needs is achievable using the plugin’s current features, or if this is maybe something that you have/would consider to include on your development roadmap? It would be great to know!

Kind regards,
Waclaw Jacek

Comments (1)

  1. Željan Topić

    Added a fix with 4.10.7. Basically, when the time zone changes, the time slot is not auto-selected. In future, we'll add selection of converted time slot, but for now, this will help to remove the confusion.

  2. Log in to comment