Get Scheduler to have TimeZone: UTC


#1

Hello all,

As far as I understand, dhtmlxScheduler will always display a calendar using the clients browser time zone.

Using the option: scheduler.config.server_utc = true
The scheduler will still display the calendar the same way, but it will automatically convert times from local to UTC when sending to server, and UTC to local when reading from server.

I was wondering if there was any way we could over-ride the default time zone used to display times (browsers local time zone). We have a use-case where users may want to view a schedule using arbitrary time-zones. We can do all the conversions server side, and just send the converted date-time client side to display, however the issue arises when we need to deal with timezones and day light savings is at play.

If my browser is set to say EST, but I’m actually trying to view a schedule in GMT, I would run into an issue where I’m trying to display a valid time in GMT, but given that the schedule is being drawn using my browser timezone (EST), the same time in EST will be invalid. As a result, it seems as though I am unable to show a Scheduler on a timezone other than browsers even with server side timezone conversions.

I think this would only be a problem in the case where clocks are moving forward by an hour (1 hour doesn’t exist) as this hour would be different depending on the time zone being used. Is there a way I could get around this issue? Thanks in advance for any feedback / assistance.


#2

Hi,
unfortunately, there is no good solution other than to customize source codes of scheduler quite heavily.
Scheduler works with native Dates which are in local timezone. A full featured timezone emulation is not possible without switching scheduler to a custom date implementation that supports different timezones


#3

Hi Team is it possible to set my scheduler timezone manually, right now it is taking the current system timezone ? Is there a way to override this ?


#4

Hello,
The scheduler works with native JS dates, so it can work only in the local timezone. We plan to add support of moment.js or different dates in order to have timezone support in one of the future updates, although right now there is no opportunity to implement this feature.