Returns a new CalculationDate on the same date with the specified time, including milliseconds. 

var date = now.valueOf('2017-03-15').withTime(23,59,59,999); 

console.log('Date = %s', date);

//Date = 2017-03-15 23:59:59
Did this answer your question?