Timeline rendering bug on system timezone changing

Hello,
I found a case in which I have the “get.ignore_time” parameter in the working time calculations. When my default system time zone is GMT, this param displays the timeline correctly and hides unused time cells.
But if I change the time zone, for example, to CST(GMT-05:00), “gantt.ignore_time” will not work, and there are time cells on the timeline that should be hidden, but still visible. DHTMLX Snippet Tool

Bug

Hello Ilya,
Unfortunately, I couldn’t reproduce the issue in the snippet:



I could only see 3 “days” when I disable the ignore_time function or use the GPL version. But in that case, it is expected as these cells are actually hour cells with the step: 8 parameter.
Another possible way to see that is to add the hour value to the gantt.config.start_date parameter. In that case, the timeline will start at a specific hour, and the conditions in the ignore_time function (hide only hours 8 and 16) are not applied:

But in all these cases, it works as expected.

Please clarify the exact name of the timezone you tried and make sure that the issue is reproduced in the snippet with that timezone.

Sorry for my late reply. Issue is reproduced with GMT-0500 (Cuba Standard Time) timezone and some others timezones

Hello Ilya,
Thank you for the clarification. I was able to reproduce the issue.
If we add the hour value to the bottom scale, we can see that there are 3 scale cells with different hours:


And it doesn’t contradict the ignore_time function that only hides the cells that start at 08 and 16 hours:

const isDateHiddenOnScale = (date) => {
  if (date.getDay() === 0 || date.getDay() === 6) {
    return true
  }

  if (date.getHours() === 8 || date.getHours() === 16) {
    return true
  }

  return false
}

Initially, the scale cells have the 00:00 hours, but starting from the 11th March they start at 07:00:


That issue occurs because of the wintertime-summertime changes.
If we remove the ignore_time function, we can see that before Saturday, 09 March, all cells start with the 00, 08, and 16 hours:

If you add 8 hours to 2024-03-09 16:00, you get 2024-03-10 01:00 instead of 2024-03-10 00:00 because of wintertime to summertime change. This is how it is implemented in Javascript Date functions, and there is no way to change it. Gantt makes some compensation for that to make the task dates work correctly, so it returns 2024-03-09 23:00 to make sure it is the same day. But anyway, you cannot get 2024-03-10 00:00.

So, you will need to implement a custom solution for that use case. And the implementation depends on how you want it to work.