When I create an appointment in scheduler
Its saving in database like this way
Its having like 16 Hours difference in Database. I'm in +5.5 Time zone
Regarding one development item we need these details that what time is this saving in the database and what calculation is going on.
When I see this created appointment from Canada. The time difference also not correct. It should be like 9.5H or 10.5H (with DST) difference.
When we look into the same event in Canada timezone
It looks like 21 Hour Difference from +5.30 Timezone. I think it's not correct.
Can we get the details regarding this one.
Event created from the small window of the scheduler.
We are unable to reproduce your reported problem and suspect that the additional hours may be added when the appointment is added to the database. Can you check our shared sample and share the below details to proceed further?
Appointment in Schedule:
Appointment in DB:
We found the issue which is happening when we host the application. When we run the application locally, time difference is working fine but when we host the application in the server (located in Canada) it is giving a wrong time difference. Any idea? (Used the same remote database)
Kavishka, we require the below additional information to validate your reported problem at our end. Please share the below details to proceed further.
I hosted the same sample application which you provide with new database connections in the server located in US Canada Time Zone.
This is event I created from UTC +5.5 (India Time)
When I see the same appointment from Canada time zone
There are like 21 Hour difference. But originally it should be like 9.5 or 10.5H (With Daylight saving).
SQL Record -
When I create the events from my local time zone (Local visual studio debug) It is showing the correct time difference (10.5 H) in Canada time zone.
Can I know the cause of this issue
Kavishka, you can resolve the problem by resetting the timezone offset values based on the client and server timezone using ej.serverTimezoneOffset as mentioned in the below UG.
var serverTimeZoneDifference = -5.0 // if your server is in EST time zone (UTC -5.0) (in hours)
var clientSideTimeZoneDifference = new Date().getTimezoneOffset() / 60; // get client time zone difference and convert it to hours;
ej.serverTimezoneOffset = serverTimeZoneDifference + clientSideTimeZoneDifference;
Refer below forum, for more information.