Our pure JavaScript Scheduler component


Post by lpbeaumont »

Hello,

I have a question on how to apply different timezones on CalendarInterval recurrentStartDate/EndDate laterjs expressions. Currently, our backend interprets recurrentStartDate/EndDate on it's own local time.
We would like to specify the timezone on these properties, or the hours offset.

Here is my scenario:

Our resources working availability are represented with a Calendar per resource, which contains multiple CalendarIntervals. These resources are located all around the world, and also, a single resource might be relocated, elsewhere too.

{
    id: "resource_1_calendar",
    name: "Workhours Resource 1",
    unspecifiedTimeIsWorking: false,
    intervals: [
       // Resource 1 working from utc - 5
       {
         priority: 20,
         isWorking: true,
         // laterjs returns a date in the current machine local time.
         // How can we specify timezone offset on these expressions?
         recurrentStartDate: "on Mon,Tue,Wed,Thu,Fri at 8:30",  // How can we offset 5 hours here
         recurrentEndDate: "on Mon,Tue,Wed,Thu,Fri at 12:30", // How can we offset 5 hours here
         startDate: "2023-05-25T05:00:00.000Z", // Works as expected
         endDate: "2025-05-25T05:00:00.000Z" // Works as expected
       },
       // Resource 1 working from utc - 2
       {
         priority: 20,
         isWorking: true,
         recurrentStartDate: "on Mon,Tue,Wed,Thu,Fri at 8:30", // How can we offset 2 hours here
         recurrentEndDate: "on Mon,Tue,Wed,Thu,Fri at 12:30", // How can we offset 2 hours here
         startDate: "2025-06-25T02:00:00.000Z", // Works as expected
         endDate: "2025-07-25T02:00:00.000Z" // Works as expected
       },
    ]
}

Regards


Post by alex.l »

hi,

Recurring rules doesn't support timezones. You can manage timezone on component level https://bryntum.com/products/schedulerpro/docs/api/SchedulerPro/view/SchedulerPro#config-timeZone

All the best,
Alex Lazarev

How to ask for help? Please read our Support Policy

We do not write the code in bounds of forum support. If you need help with development, contact us via bryntum.com/services


Post Reply