Grid date field when formatting subtracts 1 day

Example in a view of mysql is stored 2012-08-13 and when the grid formatting shows 12/08/2018
I attach my code:

Attachment: lista_13b77ee8.rar

5 Replies

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team September 10, 2018 04:45 AM UTC

Hi Gustavo,   
  
Thanks for contacting Syncfusion Support.   
  
We could see you are facing the Data Conversions problems while rendering the Grid. We have already discussed about handling the Date Conversions in the following documents.   
  
KB https://www.syncfusion.com/kb/8613/how-to-convert-dates-to-utc-format which will discuss about the UTC date conversion in the Grid with the ej.parseDateInUTC.   
  
Help Document on ej.serverTimezoneOffset https://help.syncfusion.com/js/datamanager/servertimezoneoffset.   
  
Please follow anyone of the discussion to overcome the datetime conversion issue.  
  
Regards,   
Seeni Sakthi Kumar S. 



GU Gustavo September 10, 2018 03:29 PM UTC

I would like to disable the UTC conversion. If in MySQL, 2018-09-10 is stored, I would like that value to be displayed regardless of the time zone of the server and / or client.

This is possible?


SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team September 11, 2018 05:46 AM UTC

Hi Gustavo,  
 
As suggested in our previous update, we can prevent the conversion in the following methods. 
 
KB https://www.syncfusion.com/kb/8613/how-to-convert-dates-to-utc-format which will discuss about the UTC date conversion in the Grid with the ej.parseDateInUTC.    
   
Help Document on ej.serverTimezoneOffset https://help.syncfusion.com/js/datamanager/servertimezoneoffset 
 
Regards,  
Seeni Sakthi Kumar S. 



GU Gustavo September 20, 2018 02:37 PM UTC

It does not work I've tried

I have tried adding the following code

var serverTimeZoneDiff = -3.0 // if your server is in EST time zone (UTC -3.0) (in hours)
         var clientSideTimeZoneDiff = new Date (). getTimezoneOffset () / 60; // get client time zone difference and convert it to hours;
         ej.serverTimezoneOffset = serverTimeZoneDiff + clientSideTimeZoneDiff;

I have also tried adding:
ej.parseDateInUTC = false;

But I always get a difference of one day as can be seen in the image that I attach.

I attack my complete code:




Attachment: date_error_19586998.rar


SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team September 24, 2018 12:46 PM UTC

Hi Gustavo,  
 
We have confirmed it as an issue with the DataManager Parser. We have created a new Support new incident under your DirectTrac account. Please track the Support Incident under your account for better follow-up. Please visit the DirectTrack link,  
 
 
Regards,  
Seeni Sakthi Kumar S. 


Loader.
Up arrow icon