We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Schedule not taking into account Time Zone

Thread ID:

Created:

Updated:

Platform:

Replies:

119136 May 13,2015 05:45 PM May 14,2015 07:13 AM JavaScript 1
loading
Tags: ejSchedule
Gustavo Rayo
Asked On May 13, 2015 05:45 PM

Hello, 

I am trying to show an appointment using ISO 8601 date format, but the ejSchedule is not taking into account the time zone. it is showing the appointment a day before (2015-05-13). How can I make it to show the appointment in the day I am specifying(2015-05-14) . This is the snippet of code I am using.

            var dManager = [

            {

        Id: 1,

        Subject: "Project Review.",

        StartTime: new Date("2015-05-14T00:00:00-06:00"),

        EndTime: new Date("2015-05-14T01:30:00-06:00"),

        Description:"",

        AllDay: false,

        Recurrence:false

    }];


                $("#Schedule1").ejSchedule({

                width: "100%",

                height: "525px",

                timeZone: 'UTC -06:00',

                appointmentSettings: {

                    dataSource: dManager,

                    id: "Id",

                    subject: "Subject",

                    startTime: "StartTime",

                    endTime: "EndTime",

                    description:"Description",

                    allDay: "AllDay",

                    recurrence: "Recurrence",

                    recurrenceRule: "RecurrenceRule"

                }

            });

Thank you


Sarath Kumar P K [Syncfusion]
Replied On May 14, 2015 07:13 AM

Hi Gustavo,

Thanks for using Syncfusion products.

We suspect that the appointment rendering time change since the appointments starttime/endtime calculated with the system timezone value (ex: Your system time zone UTC -05:00) which you have given to the schedule control, so that the appointments are rendered with time difference of UTC -05:00. We suggest you to set the starttime and endtime value based on the system time zone or to set the time zone value as UTC (Coordinated Universal Time) in your system to render the appointments with proper start time and end time as we have given in the data source.

<code>

Id: 1,

Subject: "Project Review.",

StartTime: new Date("2015-05-14T00:00:00-06:00"), //Set the system time zone value as UTC (Coordinated Universal Time) to render with given time

EndTime: new Date("2015-05-14T01:30:00-06:00"),

Description: "",

AllDay: false,
Recurrence: false

Id: 1,

Subject: "Project Review.",

StartTime: new Date("2015-05-14T04:00:00-06:00"), //Change the start and end time as per system time zone(UTC-05:00(Eastern Time(US&Canada))) to render 12 to 1:30

EndTime: new Date("2015-05-14T05:30:00-06:00"),

Description: "",

AllDay: false,
Recurrence: false

</code>

We have prepared the sample with your given data, which can be download from the below link.
http://www.syncfusion.com/downloads/support/forum/119136/TimeZone1418071538.zip // Run the sample with system time zone UTC (Coordinated Universal Time) to render with given time

Please let us know if you need further assistance on this.

Regards,
Sarath Kumar P K


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;