Spring executes at server-side, and JavaScript executes at client-side. For the point of view of Spring, JavaScript is just text that must be generated. And this text must represent valid JavaScript source code.
The JavaScript source code that creates an array of dates could thus be generated like this:
var dateArray = [];
<c:forEach var="javaDate" items="${cust.dates}">
dateArray.push(new Date(${javaDate.time}));
</c:forEach>
This will generate the following JavaScript code:
var dateArray = [];
dateArray.push(new Date(65987985);
dateArray.push(new Date(98654654);
// ...
with the numeric arguments being the number of milliseconds since the epoch, which is the same in Java and JavaScript.
var array = new Array(${cust.dates});just gives me a char array of the dates in a unusable format.