Closed kvedantmahajan closed 4 years ago
Don't you think guys, offset is an issue while returning d.getTime();
d.getTime()
I think it should be
function getUnixTime(d) { const offset = d.getTimezoneOffset() * 60 * 1000; const withOffset = d.getTime(); return withOffset - offset; }
I just referred here - https://stackoverflow.com/questions/9229213/convert-iso-date-to-milliseconds-in-javascript
Let me know your thoughts for timeZone difference!
Hi @kushalmahajan,
I don't think offset will be a problem in this case since you are running and using the server in local.
This issue can be closed as it does not seem to be a real bug.
Don't you think guys, offset is an issue while returning
d.getTime()
;I think it should be
I just referred here - https://stackoverflow.com/questions/9229213/convert-iso-date-to-milliseconds-in-javascript
Let me know your thoughts for timeZone difference!