Schedule not taking into account Time Zone
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
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
- 1 Reply
- 2 Participants
-
GR Gustavo Rayo
- May 13, 2015 09:45 PM UTC
- May 14, 2015 11:13 AM UTC