Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Abhishek Shukla on Sep 03, 2009 14:00
open dhtmlx forum
Timezone + dHTMLxScheduler

Hello
Just wanted to know how I can I implement the following functionality.
Let say that I want to save the event timezone as UTC so for that I used
scheduler.config.server_utc = true;

But we have a functionality where user has set there time zone let say user set his timezone in DB as EDT.
So I want when a user save the event it should get saved in UTC but while display it should show as per the user selected timezone which is EDT.

So please help me to configure the Scheduler. MeanWhile I am trying to get this fixed.

Thanks
Abhishek
Answer posted by Support on Sep 04, 2009 01:03
Scheduler can work with UTC time, but it will use the actual timezone of PC , in which it is loaded, not the some predefined one. 
When scheduler.config.server_utc set scheduler will do utc-local time conversions for both loading and saving operations, according to time zone settings of PC, it is not possible to use some other timezone , instead of actual one. 

In your case, you can ignore client side utc conversion, but add your custom code to server side ( beforeRender and beforeProcessing events in case of connectors ) which will convert data to UTC and back on server side before loading and saving operations.