I have a couple of GMT time zones like this:
GMT-06:00
GMT-05:00
GMT-04:00
Right now I am using this to convert a time stamp into a date and time like this:
formatted = moment(timestamp).format('YYYY-MM-DD HH:mm:ss z');
Which returns something like 2018-07-02 14:15:03
But the date and time are returned in my local time. I was wondering if moment.js allows me to supply a GMT timezone, and have the date and time be returned in the local time of that specific time zone.
I know that moment.js allows me to do this:
moment(timestamp).tz("Africa/Accra").format('YYYY-MM-DD HH:mm:ss z');
which would return the date and time in that specific "Africa/Accra" time zone, however, I can't use that because I only have GMT time zones right now.