Date changes automatically on "onTaskLoading" Event

I have JSON Data loaded from server and the loaded data contains start_date and end_date and it is a type “milestone”. But when it displayed in the gantt date changes and incremented by 1 day.

gantt.attachEvent("onTaskLoading", function(task){
      console.log(task.start_date)
      console.log(task.end_date)
      console.log(task);
      return true;
    });

When I console the data it shows different data;
The first 2 console outputs the following
Screenshot 2022-10-13 174720
and the last console to print the whole task shows;
Screenshot 2022-10-13 174805

The data for start_date and end_date are different here.

How can I resolve this?

Any thoughts on this issue?

Hello,

Probably, it should be related to Gantt configuration, but it is hard to suggest what might be wrong as I don’t see your code.
Please, add your configuration in the snippet below and make sure that the issue is reproduced there:
https://snippet.dhtmlx.com/40tsh9uz?text=gantt ;
Then, click on the Save button and send me the link. Or send me a ready demo with all the necessary JavaScript and CSS files so that I can reproduce the issue locally.