Hi Kamil,
We regret for the inconvenience caused.
We can able to replicate the reported issue in our sample. Hence, we have logged bug report as “Invalid end date calculated while using duration unit as day and project date as datetime”. The fix for the issue will be include in our upcoming volume 3 SP2 release, it will be expected to out at end of September, 2017.
In the meantime, you can prevent this issue by setting “durationUnit” property as either “hour” or “minute”.
Please let us know, if you require any other assistance.
Regards,
Suriyaprasanth R