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
close icon

Timezone problems


The ejs-datetimepicker is behaving strange: on some clients, datetimes are shifted 2 hours (we are at UTC+2) everytime it goes from the client to the server and back.

Example: a new object is created serverside, with a Date property set to DateTime.Now() (e.g. 26/09/2019 16:00) on initialize. At the client side (in the datepicker) it is shown as 26/09/2019 16:00. When the client submits the data back to the server it becomes 26/09/2019 18:00. Every time the client submits the data it increases with two hours...

This behaviour is not seen in Chrome, but is seen in Safari (but I am not sure if it is related to the browser or to the timezone settings at different clients)

any idea how to solve this?

best regards,

1 Reply

BC Berly Christopher Syncfusion Team October 1, 2019 04:36 PM UTC

Hi Koen,

Greetings from Syncfusion support. 

While checking the reported issue, the time value in the DateTimePicker will be increased based on client time zone offset value. Further analysis of this issue, while running the sample in Chrome browser it will convert the value from the C# “2019-10-17T00:00:00“ to “Thu Oct 17 2019 00:00:00 GMT+0530“ using new Date() method in chrome browser.

But, the safari browser converts the value “2019-10-17T00:00:00“ to “Thu Oct 17 2019 05:30:00 GMT+0530 (IST)“ while using in new Date() method. It seems like browser-based issue and we have raised this issue in the public forum. We will check and update the details once we get a solution.

Please find the link from below.

Please find the below screenshot to know more about this issue.

Chrome browser:

Safari browser: