I'm having issues with Epoch Date conversion. I am using moment.js JavaScript library for this purpose. I have a UTC DateTime value in the Epoch format. When I run the same epoch conversion code on two different computers (using different timezones) I get different date conversion outcomes.
I am using the following JavaScript code:
var epochTime = 1603825239000;
var result = moment(epochTime).format('lll');
document.write(result); // the result I get is: Oct 28, 2020 6:00 AM
Now when running the exact same code on a different computer having the Pacific timezone, it returns the result as:
var epochTime = 1603825239000;
var result = moment(epochTime).format('lll');
document.write(result); // now the result is different: Oct 27, 2020 12:00 PM
Is there something I could do to ensure that the epoch date conversion result doesn't change regardless of the computer timezone? and I always get the first conversion value i.e. Oct 28, 2020 6:00 AM