Recalculate Project - The added or subtracted value results in an un-representable DateTime.\\r\\nParameter name: months\",\"Description\":\"Operation Failed. Internal error.\",\"DateTime\":\"2022-08-12T09:39:06.7934085Z\",\"InnerError\":null}}"

Hi, I used the following file and called the recalculate project and got the error in the heading, see details below. For some XML files, it works, for some, it doesn’t. As the error is cryptic I am looking for help debugging this!

XML FILE:
https://we.tl/t-9yia9vY3gq

CODE:
// calculates durations correctly
await tasksApi.putRecalculateProject({
name: fileName,
mode: CalculationMode.Automatic,
validate: true,
fileName,
folder: DEFAULT_ASPOSE_FOLDER,
storage: ASPOSE_STORAGE,
});

RESPONSE ERROR
“response”: {
“req”: {
“method”: “PUT”,
“url”: "https://api.aspose.cloud/v3.0/tasks/59fb397e-2149-4aaf-bbed-95ad80db4d07.xml/recalculate/project?mode=Automatic&validate=true&fileName=59fb397e-2149-4aaf-bbed-95ad80db4d07.xml&storage=internal_storage&folder=",
“headers”: {
“user-agent”: “tasks nodejs sdk”,
“content-type”: “application/json”,
“x-aspose-client”: “nodejs sdk”,
“x-aspose-client-version”: “22.7”,
“authorization”: “Bearer …”,
“accept”: “application/json”
}
},
“header”: {
“date”: “Fri, 12 Aug 2022 09:39:06 GMT”,
“content-type”: “application/json; charset=utf-8”,
“transfer-encoding”: “chunked”,
“connection”: “close”,
“server”: “Kestrel”
},
“status”: 500,
“text”: “{“RequestId”:“Root=1-62f61fb9-20a6c7912ba8b4961582b1b7”,“Error”:{“Code”:“internalError”,“Message”:“The added or subtracted value results in an un-representable DateTime.\r\nParameter name: months”,“Description”:“Operation Failed. Internal error.”,“DateTime”:“2022-08-12T09:39:06.7934085Z”,“InnerError”:null}}”
},

@lasse.steffen,
thanks for the information. I’ve reproduced this bug and created issue for it.

A ticket with ID TASKSNET-10628 has been created to further fix the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

@lasse.steffen
we fixed the issue in Aspose.Tasks for .NET.
According to product’s lifecycle, Aspose.Tasks Cloud will be updated in October.

Awesome, thank you!