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. Image for the cookie policy date

Date Difference btw Schedule Control and What was saved in Database


I am having issues reconciling the difference btw the date on my schedule control and the one saved in my Db.Though the Date rendered from the Db back to the schedule control is rendered correctly, I can't understand the almost + 6hrs difference in the StartTime and Endtime from the Schedule Control and what was saved in the Db even though my Timezone is UTC +01:00. 

I took my time to use fiddler to investigate and I saw the following.

Note: I used the EndTime (Time only) as Subject.

The EndTime sent from the schedule is EndTime=2017-07-23T08:00:00.000Z and what was return as result after saving to Schedule and Db was EndTime=2017-07-23T09:00:00+01:00 but what was saved in the Db (MSSQL) is 2017-07-23 13:15:00.000 and what was returned from my web query (MVC) is "2017-07-23T09:00:00". 

The actual expected EndTime 9:00 AM of 23rd of July. I don't understand why the DB time is saved as 15:00 (+6hrs). I need to understand what is the cause.

Also attached are images of the data for better understanding.

My schedule was created thus  :




                         // .CellWidth("50px")



                          .Resources(res =>


                              res.Field("TerritoryId").Title("Territory").Name("Territories").AllowMultiple(true).ResourceSettings(fld => fld.Datasource(initialTerrittory)


                              res.Field("RouteId").Title("Route").Name("Routes").AllowMultiple(true).ResourceSettings(flds => flds.Datasource(initialTerritoryRoutes)



                          .Group(gr => gr.Resources(Group))


                          .CategorizeSettings(cat => cat.Enable(true))

                          //.PrioritySettings(pri => pri.Enable(true))




                          .AppointmentSettings(fields => fields.Datasource(ds => ds.URL(@Url.Action("GetCompanyScheduledRoutes", "Route", new { companyid = Model.Id, routeid = firstroute, territoryid = firstterritory })).InsertURL(Url.Action("AddScheduledRoutes", "Route", new { companyid = Model.Id }))

                    .BatchURL(@Url.Action("Crud", "Route")).Adaptor(AdaptorType.UrlAdaptor))














                              .ResourceFields("TerritoryId, RouteId"))

                              .ScheduleClientSideEvents(eve => eve.Navigation("OnNavigation").CellClick("OnCellClick").AppointmentWindowOpen("onAppointmentWindowOpen"))


Fiddler View

Schedule Control View

Web View

Database View

Attachment: DbDateDifference_de72d5a9.zip

4 Replies

CH Charles July 23, 2017 05:36 PM UTC

Note: Its is an MSSQL (2008) Database 

SE Sellakumar Syncfusion Team July 24, 2017 01:05 PM UTC

Hi Charles, 
Thanks for contacting Syncfusion support. 
The timezone conversion for StartTime and EndTime has been occurs based on the zero UTC value. So the time difference has been reduced before going to the database. The object has been retrieved from database to render the appointment, the reduced time difference has been added and displayed in the scheduler. To render the appointment as same as the time given in data base (without considering timezone difference) set ApplyTimeOffset to false within AppointmentSettings.  Kindly check this case at you end and revert us, if you need any further assistance on this. 
Sellakumar K

CH Charles July 24, 2017 02:31 PM UTC

Thanks alot, sorted it out. Its an issue with my app, somewhere @the initialization of my app, a wrong time-zone was set as default.

KK Karthigeyan Krishnamurthi Syncfusion Team July 25, 2017 05:24 AM UTC

Hi Charles,  
We are happy to hear that your issue has been resolved.  

Live Chat Icon For mobile
Up arrow icon