Given the volume of Timezone questions, I would have thought to be able to find the answer to this issue, but haven\'t had any success.
Is there a way using mo
You can ignore the browser's timezone completely by creating a new moment using moment.utc()
instead of moment()
.
For example, if you are trying to work purely with a UTC date/time of the browser's current time but want to discard its timezone data, you can recreate the browser's current time into a UTC format using the following:
let nowWithTimezone = moment();
let nowInUtc = moment.utc(nowWithTimezone.format('MM/DD/YYYY HH:mm'), 'MM/DD/YYYY HH:mm');
Further documentation on moment.utc()
: https://momentjs.com/docs/#/parsing/utc/