Reputation: 713
Why javascript is giving me different timezones in different dates?
const a = new Date()
console.log(a)
// Thu Nov 18 2021 10:14:12 GMT-0300 (Horário Padrão de Brasília)
const b = new Date(1991, 1, 15)
console.log(b)
// Fri Feb 15 1991 00:00:00 GMT-0200 (Horário de Verão de Brasília)
Upvotes: 1
Views: 76
Reputation: 96
It is because Daylight saving time is cancelled in 2019 for Brasil so now Brasil is GMT+3 and before 2019 it was GMT +2. Moment JS updated its library - https://github.com/moment/moment/issues/5246
Upvotes: 4