Different Browsers are returning different dates for the same intl.DateTimeFormat
function.
Brazil are not following Daylight saving this year https://www.timeanddate.com/time/change/brazil?year=2020#targetText=Daylight%20Saving%20Time%20(DST)%20Not,was%20on%20February%2016%2C%202019
And Intl.DateTimeFormat
appears to return the incorrect time (the example date below is in November 2019)
Example on JSBin: https://jsbin.com/waxekocaqa/edit?html,js,output
const timestamp = new Date('2019-11-07T20:00:00Z');
const londonDf = new Intl.DateTimeFormat('en', {
hour: 'numeric',
minute: 'numeric',
timeZone: 'Europe/London'
});
const saoPauloDf = new Intl.DateTimeFormat('en', {
hour: 'numeric',
minute: 'numeric',
timeZone: 'America/Sao_Paulo'
});
console.log(londonDf.format(timestamp)); // 8:00 pm
console.log(saoPauloDf.format(timestamp)); // 6:00 pm (should be 5:00 pm)
The expected result for saoPauloDf
should be 5:00 pm
, but please let me know if i missing something obvious.
Also, Safari shows the correct times, but Chrome does not