Issue with Mongoose Timestamp and epoch conversion to Date() Issue with Mongoose Timestamp and epoch conversion to Date() mongoose mongoose

Issue with Mongoose Timestamp and epoch conversion to Date()


Any wanderers with the same issue, who might have missed chridam's comment, you just need to cast the passed timestamp to int before parsing. This works:

new Date(parseInt(req.query.timestamp))