Our state of the art Gantt chart


Post by huy.le »

Hello,

Yeah, as the document said "This will convert all events, tasks and time ranges to the specified time zone or offset. It will also affect the displayed timeline's headers as well at the start and end date of it."

And in the example said very clearly, the UTC date "2022-03-27T07:00:00Z" if set to "America/Chicago" => it converts to 02:00:00 on March 27, 2022, in the America/Chicago, even the local system time zone is Europe/Stockholm.

So my local timezone is bangkok and when set the timezone to Sydney it should convert to Sydney time.

UTC: 2026-05-13T22:00:00.000Z => Sydney timezone Thursday, May 14, 2026, at 8:00 AM

But my case why the timezone was set to Australia/Sydney and the gantt bar show at 5:00Am, if the timezone was set correct, the gantt should show at 8:00AM. That is my concern. I expect the gantt barshow at 8:00AM not at 5:00AM

To clarify the issue further:

My concern is specifically about the visual timeline position.

When the project timezone is set to Australia/Sydney:

The timeline itself should represent Sydney time
The task rendered position should align with the Sydney timeline ticks

For the UTC value:
2026-05-13T22:00:00.000Z

The correct Sydney time is:
2026-05-14 08:00 AM

Therefore the task bar should be rendered aligned with the 08:00 timeline tick/header.

Currently the task bar is visually aligned with the 05:00 position instead, which appears inconsistent with the configured project timezone.

So the issue is not about how JavaScript Date is represented in console output, but rather the actual rendered timeline coordinate in the Gantt chart.

I have some images in attachment. Can you take a look at it? timezone in project and the UI visual, other image for London timezone, gantt show 8:00PM but the time in London should "11:00 PM (23:00) on Wednesday, May 13, 2026, in London time". I provided 2 timezones with wrong UI render.

Attachments
Screenshot 2026-05-19 at 9.57.27 am.png
Screenshot 2026-05-19 at 9.57.27 am.png (1.04 MiB) Viewed 4926 times
ecf34af0-3e57-4b67-95e9-c18f77b0fe8b.png
ecf34af0-3e57-4b67-95e9-c18f77b0fe8b.png (8.87 KiB) Viewed 4927 times
ce572dbf-30eb-4b85-b5ec-94512b6b7830.png
ce572dbf-30eb-4b85-b5ec-94512b6b7830.png (211.46 KiB) Viewed 4927 times

Post by joakim.l »

Hi

Since this is Gantt, all tasks startDate and endDates are calculated by the underlying scheduling engine.
For the time zone conversion of startDate and endDate you need to set manuallyScheduled to true on all tasks, to except them from the project calculation.

In that demo code, another solution is to covert the project startDate since this is the constraint that binds the only task to "2026-05-11T22:00:00.000Z". Like so: TimeZoneHelper.toTimeZone(DateHelper.parse("2026-05-11T22:00:00.000Z"), 'Australia/Sydney').

And also, you should not time zone convert the startDate and endDate in the tasks data, this is done internally, normally, but in your case, these dates are only used to calculate the duration of the task. The startDate and endDate will (if not manuallyScheduled, be calculated by the engine).

Gantt data can be very complex, and in regard to time zone I can see that it is poorly documented. However, we're building a completely new time zone support based on the Temporal API, and will be deprecating the previous date-mutation solution, so we'll probably not fix anything not serious related to that.

Regards
Joakim


Post by huy.le »

Thank you for your reply,

I didn't use any timezone convert and get that issue. The start and end date are UTC date value.

I attach again the example for you reproduce the issue. Can you take a look at it to confirm this is an timezone issue?

Attachments
gantt-angular-inline-data (1).zip
(148.35 KiB) Downloaded 892 times
Last edited by huy.le on Tue May 19, 2026 9:02 am, edited 1 time in total.

Post by joakim.l »

Tried both setting manuallyScheduled and time zone coverted project startDate and both these (individually) yielded the correct startDate of the task (8am), in your new example code.

Regards
Joakim


Post by huy.le »

Thank you so much,

It seem be worked. I tried to set only the project start date and it works, I have a question, if there is no project start date. How can we work arround the issue?


Post by joakim.l »

That was a bit more complicated. If no startDate is set on the project, then it will be calculated from the earliest task's startDate. And this is done before the time zone conversion is applied, making the startDate of the project use the local system time zone, and then that is also applied to the tasks when the engine runs scheduling.

If we weren't deprecating this date-mutation time zone support, we'd fix this. But now, I would suggest working around this by converting the earliest (the first?) task to the desired time zone:

"startDate": TimeZoneHelper.toTimeZone(new Date("2026-05-13T22:00:00.000Z"), 'Australia/Sydney'),
"endDate": TimeZoneHelper.toTimeZone(new Date("2026-05-14T06:00:00.000Z"), 'Australia/Sydney'),
"timeZone": 'Australia/Sydney'

Remember to include the timeZone property. It tells the Gantt that this date is already converted.

Regards
Joakim


Post by huy.le »

Thank you so much.


Post by huy.le »

Hello,

Everything is good, but when i load the calendar, the gantt bar show wrong endDate

EndDate value "2026-05-14T06:00:00.000Z" converted to Sydney "2026-05-14 at 04:00 PM". but the UI it shows at 1PM. you can see in the attachment. I also attach the project with calendar to see the issue.

Can you help me how to work arround this issue?

Attachments
Screenshot 2026-05-19 at 3.56.52 pm.png
Screenshot 2026-05-19 at 3.56.52 pm.png (501.93 KiB) Viewed 4880 times
gantt-angular-inline-data 3.zip
(200.96 KiB) Downloaded 883 times

Post by joakim.l »

There are know issues and limitations with Calendars and the current time zone support.
When I tested your latest exampe code, I don't get the same results. So I guess it depends on local system time zone.
But, when trying the same approach as the previous suggestion (setting converted time to the actual tasks) it renders correctly.

These problems should all be fixed in the new time zone support available in 8.0.

Regards
Joakim


Post by huy.le »

Thank you, it works.

Do you know when new version get released?


Post Reply