fix times: MATLAB date number is double(days), not double(seconds); add capacity parameter