Best approach for data using ISO utc time?

Hi,

What’s the best approach for configuring the pro gantt control when the data is using UTC ISO format date time? (2016-12-30T14:52:27Z)

I see this:

gantt.config.server_utc = true;

But its not quite clear where else I might need to specify time formats etc so that I’m always getting ISO at the server… and correct date formats in the client.

Thanks.

I’m actually unable to specify a date pattern to match an ISO date timestamp. It appears I can’t put a “T” in the pattern for the conversion of the server time to local time.

Can you confirm this is an issue or if there is some way to specify the “T” character and the “Z” character so that I can use standard ISO UTC time for the data?

This does not seem to work:

gantt.config.xml_date = "%Y-%m-%dT%H:%i:%sZ";

Hello,

Unfortunately, dhtmlxGantt doesn’t support letter symbols in the format (as for example, “T” or “S” in your case).

You can use symbols only from Date Format Specification:
docs.dhtmlx.com/gantt/desktop__date_format.html

I believe from a support ticket the way to accomplish using ISO UTC is to do like such:

gantt.templates.xml_date = function(dateString){ return new Date(dateString); };

… since Date supports ISO.