Reservation Date/Time fields


You may have resources in different timezones, this article explains how to deal with those.


Configuration in Salesforce Classic

In order to keep configuration simple, please perform the following steps in Salesforce Classic (Booker25 is Lightning-Ready, you may afterwards use the app in Salesforce Lightning as you please)


Salesforce always renders Date and DateTime fields relative to the timezone of the user that is viewing them. This means Booker25 needs some specific fields to allow for correctly inputting and outputting reservation dates and times.

Step-by-step guide

  1. In the Booker25 app, navigate to the Resources tab
  2. In the Resource hierarchy, make sure that every timezone's top node (defining the timezone of itself and its children) has the correct timezone filled in in the Timezone field. Its children will automatically be given the same timezone

  3. Now strictly follow the following matrix for inputting and outputting reservation dates and times in either the reservation's resource's timezone or the viewing user's timezone:

    Input / OutputFields LabelField API NameWhat?Where?Type
    Input on Reservation formStart (local time)B25__StartLocal__cStart date & timeResource local timezoneDate/Time
    Input on Reservation formEnd (local time)B25__EndLocal__cEnd date & timeResource local timezoneDate/Time
    OutputLocal Start DateB25__Start_Date__cStart dateResource local timezoneDate
    OutputLocal End DateB25__End_Date__cEnd dateResource local timezoneDate
    OutputLocal Start timeB25__Local_Start_Time__cStart timeResource local timezoneText(5)
    OutputLocal End timeB25__Local_End_Time__cEnd timeResource local timezoneText(5)
    OutputLocal Start DatetimeB25__Start_Local_DateTime__cStart date & timeResource local timezoneFormula(Text)
    OutputLocal End DatetimeB25__End_Local_DateTime__cEnd date & timeResource local timezoneFormula(Text)
    Output / Input through API or ProcessUser Start DatetimeB25__Start__cStart date & timeViewing user timezoneDate/Time
    Output / Input through API or ProcessUser End DatetimeB25__End__cEnd date & timeViewing user timezoneDate/Time

Example

The following screenshots display a real-world example based on a resource in London (GMT) and a user in Amsterdam (GMT+1)


Timezones

The calendar displays resources in its own timezone. Even if there are two resources shown in the calendar with different timezones, this will display the reservations in these resources in respect of that resource's timezone. The calendar does not automatically adjust itself based on the user-selected Locale and Timezone.

For Example, if you have two resources, Resource One in (GMT+01:00) Central European Standard Time (Europe/Amsterdam) and Resource Two in (GMT+00:00) Greenwich Mean Time (Europe/London) dragging a reservation with start-time 15:00 from Resource One to Resource Two will result in the local time not being changed, the GMT times will be changed.

The same reservation is shown twice in two resources with different timezones:

Resource One (GMT+01:00)

Resource Two (GMT+00:00)




Related articles


On this page