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

Remove Timezone

HI All,

It's possible to remove timezone +01:00

because in SQL i have : 2017-01-01 00:00:00.000

and in Html.EJ().Grid<object>("FlatGrid") i have : 2017-01-01 01:00:00

It's Urgent please!!

Thanks,
Nicholas

5 Replies

SA Saravanan Arunachalam Syncfusion Team February 1, 2017 09:32 AM UTC

Hi Nicholas, 
Thanks for contacting Syncfusion’s support. 
The date-time request on the controller is depend on the server time zone. Please refer to the following link to know more details. 
If the client and server has different timezone, the Grid content will show the date based on the client timezone. So, we suggest you to store date-time in common timezone (GMT/UTC) on the database or convert the date to UTC date format and return to the client. 
Regards, 
Saravanan A. 



NP Nicholas Picardi February 1, 2017 10:25 AM UTC

Thanks,

But why on Internet Explorer this problem is not present?


SA Saravanan Arunachalam Syncfusion Team February 2, 2017 06:09 AM UTC

Hi Nicholas, 
If you return the date from the server without format, it is returned as string to the client and it passes the string to the default browser date constructor. So, we suggest you to format the date while return to show the UTC timezone in all browser and please refer to the below link to get more details. 
Regards, 
Saravanan A. 



AR Arpan Rao September 18, 2020 06:24 AM UTC

I am also stuck with same issue, can someone please post the solution here?



MP Manivannan Padmanaban Syncfusion Team September 21, 2020 09:29 AM UTC

Hi Arpan, 

Greetings from Syncfusion Support. 

To overcome the reported “Time Zone” issue, we recommend that you use ej.serverTimezoneOffset property. Refer to the below code example, 
 
<script type="text/javascript">  
   . .  .  
    var serverTimeZoneDiff = -5.0  // if your server is in EST time zone (UTC -5.0) (in hours)  
    var clientSideTimeZoneDiff = new Date().getTimezoneOffset() / 60; // get client time zone difference and convert it to hours;  
    ej.serverTimezoneOffset = serverTimeZoneDiff + clientSideTimeZoneDiff;  
  
. . .  
        </script>  

Also, refer the below help documentation link. 

After referred the above solution, still facing an issue. Please come back to us, with the below details. 
  1. Share the complete grid code example (both client and server end)
  2. Share the screenshot Or video demonstration of the issue.

Provided details,  will help us to resolve the reported issue as early as possible. 

Regards, 
Manivannan Padmanaban 




Loader.
Live Chat Icon For mobile
Up arrow icon