Consider code below,
const appointments = [
{
// id: 0,
title: 'Watercolor Landscape',
users_id: 2,
startDate: new Date(1584576000000 * 1000), // here is timestamps in milliseconds
endDate: new Date(1584662400000* 1000), // here is timestamps in milliseconds
ownerId: 1,
},
];
but the output of startDate was wrong, :
It should be:
startDate: Thursday, March 19, 2020 8:00:00 AM GMT+08:00
endDate: Friday, March 20, 2020 8:00:00 AM GMT+08:00