How to convert a datetime to another timezone datetime then to utc using moment.js? This has to be done without using the timezone library so functions like tz and setTimezone are not available. The datetime is entered by the user.
So '5/24/2019 20:35' in Hawaii time is expected to be 5/25/2019 06:35AM in utc. My local computer is Pacific.
I tried this:
moment.utc(moment('5/24/2019 20:35','M/D/YYYY h:mm').utcOffset(-10).format("MM/DD/YYYY HH:mm:ss")).format('MM/DD/YYYY HH:mm:ss');
but it's not correct.