virmach firefox unfriendly

let options = { timeZone: 'America/Los_Angeles', // This is for PST/PDT timezone year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric', }; let formatter = new Intl.DateTimeFormat([], options); // Firefox unfriendly code var now = new Date(formatter.format(new Date())).getTime(); // Firefox unfriendly code var countDownDate = new Date(started).getTime() + parseInt(saleDuration); // Find the distance between now and the count down date var distance = countDownDate - now;
`formatter.format(new Date(nowMs))` results in

`new Date(formatter.format(new Date(nowMs)))` results in

ISO compliant - offset

var pst = new Date('2024-01-01T00:00:00-08:00'); var local = new Date('2024-01-01T00:00:00'); var serverToLocalOffset = pst - local; var countDownDate = new Date(started).getTime() + serverToLocalOffset + parseInt(saleDuration); var now = new Date(nowMs).getTime(); // Find the distance between now and the count down date var distance = countDownDate - now;
`pst` is

`local` is

`serverToLocalOffset` is

append gmt-8 to virmach backend start time

var countDownDate = new Date(started + " GMT-08:00").getTime() + parseInt(saleDuration); var now = new Date(nowMs).getTime(); // Find the distance between now and the count down date var distance = countDownDate - now;
`new Date(started + " GMT-08:00")` results in