I have been fighting with this for a bit now. I’m trying to convert epoch to a date object. The epoch is sent to me in UTC. Whenever you pass new Date()
an epoc
The Easiest Way
If you have the unix epoch in milliseconds, in my case - 1601209912824
const dateObject = new Date(milliseconds)
const humanDateFormat = dateObject.toString()
Sun Sep 27 2020 18:01:52 GMT+0530 (India Standard Time)
const dateObject = new Date(milliseconds)
const humanDateFormat = dateObject.toUTCString()