moment / luxon

⏱ A library for working with dates and times in JS
https://moment.github.io/luxon
MIT License
15.33k stars 730 forks source link

America/Mexico_City is 1 hour off #1497

Open ricardoMogg opened 1 year ago

ricardoMogg commented 1 year ago

Describe the bug seting a time zone to America/Mexico_City returns -05:00 hour instead of -06:00 .

To Reproduce Please share a minimal code example that triggers the problem:

let currentDateTime = DateTime.fromMillis(Date.now()).setZone(
      tod.timeZone ?? 'America/Mexico_City',
    );
console.log(currentDateTime

Actual vs Expected behavior it should give -06:00 it gives -05:00

Desktop (please complete the following information):

Additional context Mexico stopped observing day light savings since last year, and this is probably not reflected here.

https://newsus.cgtn.com/news/2022-11-13/Mexico-eliminates-daylight-saving-time-1eUHUADJneU/index.html#:~:text=The%20Mexican%20government%20has%20voted,remain%20permanently%20on%20standard%20time.

diesieben07 commented 1 year ago

Luxon uses the time zone database of the underlying platform through the Intl.DateTimeFormat API.

Most likely you are running an out of date Node.JS version. In my tests Node 12 (12.22.12) is the newest Node version that reports the old offset. Node.JS 12 has been "end of life" since April 2022.

Please clarify which runtime you are using, most likely you need to update it.