UTC times being adjusted when displaying in grid for dates on change to/from daylight savings

We are using version 19.4.38 of the EC2 library so you may not be able to help, however:

When using data manager to fetch server-side data, we return dates in UTC time zone. Then on the client side, when displaying these dates in the grid, we have set:

ej.data.DataUtil.serverTimezoneOffset = 0;

This allows dates to be displayed exactly as they are stored on the server without conversion to the user's time zone in almost all cases. This approach does not work on the days when the user's locale has switched from standard time to summer/daylight savings time. For all dates on that day, the grid control is subtracting 1 hour from the UTC time before displaying.

For example if we send UTC 1728172800000 in the JSON response, this should represent 6 October 2024 12:00:00 AM. However when loaded into the grid, this date/time is appearing as  5/10/2024 11:00:00.

For dates either side of the 6th, this does not happen, eg the time is not changed.

Is there a work around for this, or is it going to be necessary to upgrade to the latest version to resolve t


1 Reply

VS Vikram Sundararajan Syncfusion Team October 11, 2024 08:37 AM UTC

Hi Darren Munt,


Greetings from Syncfusion support,


We could see that you are using the old version(19.4.38). we would like to inform you that we have included a lot of bug fixes related to UTC converted, so we recommend upgrading to the latest Syncfusion packages (version 27.1.52) to improve the performance in the Grid.


We recommend following the steps below to upgrade the Syncfusion packages to the latest version and remove any duplicate packages in the 'node_modules' folder to resolve the issue:


1)  Backup your old Syncfusion packages(node_modules>@syncfusion).

2)  Delete the package.lock.json file from your application. 

3)  Remove the @syncfusion package folder from the node_modules directory.

4)  Use the latest version or “*” (which installs the latest packages) for all Syncfusion components in package.json file.

5)   Then install the NPM packages.


Documentation: https://ej2.syncfusion.com/javascript/documentation/common/how-to/update-npm-package


If the issue persists after upgrading, please provide more details about the dataManager configuration, specifically the adaptor being used (such as ODataAdaptor, WebApiAdaptor, etc.), along with any timezone or date-related logic being handled on the server side.


Regards,

Vikram S


Loader.
Up arrow icon