Could you please reproduce the issue here? docs.dhtmlx.com/gantt/snippet/
It is not a typical problem, perhaps you have custom code which changed default behaviour. Demo should help us understand the cause of it.
And please specify the way you calculate task duration.
In your case end_date is 2017-09-13. So it means that your event finishes October 13th at 00:00 and covers October 12th and don’t cover October 13th. Duration of the event is 2 days (11, 12 Oct).