Timezone Handling

From 3B Knowledge
Jump to navigation Jump to search

Settings

A new property has been added to all definitions (Scheduler, Client Scheduler, Mobile App and Timesheeting) that allows you to control and set the timezone for the application's operation.

The option is called: timezonePreference and it accepts one of two values:

{
    "timezonePreference": "user",   //can be user or local
    "schedulables": {
        ...
    }
}

user - if you set it to user, then the salesforce user's timezone will be used for all operations. If the app is surfaced through a guest site user, then ensure the guest site user's timezone is set correctly. Similarly, if served in a digital experience, be mindful of the

local/client - if you set it to local/client (referring to the client's computer), we will offset times to the user machine's timezone.

Recommendation

We recommend keeping the scheduler's definition in "user" timezone - this will ensure that the times the user sees in the scheduler will be exactly the same as the times they see on record details, reports and custom components.

We recommend keeping the mobile app, timesheeting and client scheduler in "local" timezone - this means that the times will be displayed according to the user's location.

How it works?

  • Say a salesforce user (recruiter) is based in New York. This user wants to create a shift to start at 09:00. The scheduler is set up to "user" preference, meaning that when the user enters 9am for the shift, it is going to be at 9am New York time. So, if a candidate that is based in New York looks at their app (which is set up in "local" timezone), they will see the shift as starting as 09:00am. However, if a candidate based in San Francisco (-3 hrs from New York) will see the shift starting at 06:00
  • If however you set up the scheduler and mobile apps both to use "user" timezone, then everyone will see the shift starting at 09:00, regardless of where in the world they are currently.
  • If you set up the scheduler to use "local" timezone, then the user creating shifts will be creating them in their own timezone