I want to create Start and End Time stamp using Moment.js (EST):
- StartTime would be today's start time
- EndTime would be current time.
I have used moment.js and created like this
var time = new Date();
var startTime=Date.parse(moment(time).startOf('day').tz('America/New_York').format("MM/DD/YYYY HH:mm:ss"));
var endTime=Date.parse(moment(time).tz('America/New_York').format("MM/DD/YYYY HH:mm:ss"));
It is giving time in milliseconds.
Is it correct or wrong?
I am not getting data from db because there is mismatch in Time stamp.