You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all - thanks for bringing timezones support to date-fns 🙌🏻
I'm pretty sure I missed something. However, I can't get these to work in Chrome.
// CHROMEfromUnixTime(1732204800,{in: tz('America/Denver')}).toString()// 'Thu Nov 21 2024 18:00:00 GMT+0200 (Eastern European Standard Time)'newTZDate(1732204800000,'America/Denver').toString()// 'Thu Nov 21 2024 09:00:00 GMT-0700 (Mountain Standard Time)'format(fromUnixTime(1732204800,{in: tz('America/Denver')}),'MM/dd/yyyy h:mm a z')// '11/21/2024 6:00 PM GMT+2'format(newTZDate(1732204800000,'America/Denver'),'MM/dd/yyyy h:mm a z')// '11/21/2024 6:00 PM GMT+2'
Node has it as I would naturally expect:
// NODEfromUnixTime(1732204800,{in: tz('America/Denver')}).toString()// Thu Nov 21 2024 09:00:00 GMT-0700 (Mountain Standard Time)newTZDate(1732204800000,'America/Denver').toString()// Thu Nov 21 2024 09:00:00 GMT-0700 (Mountain Standard Time)format(fromUnixTime(1732204800,{in: tz('America/Denver')}),'MM/dd/yyyy h:mm a z')// 11/21/2024 9:00 AM GMT-7format(newTZDate(1732204800000,'America/Denver'),'MM/dd/yyyy h:mm a z')// 11/21/2024 9:00 AM GMT-7
Are my expectations wrong? I would expect Chrome's output to match the node's output.
Thanks in advance for any hints 🙏🏻
Browser: Chrome, 5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Node: v23.1.0
date-fns: 4.1.0
@date-fns/tz: 1.2.0
The text was updated successfully, but these errors were encountered:
Hi there 👋🏻
First of all - thanks for bringing timezones support to
date-fns
🙌🏻I'm pretty sure I missed something. However, I can't get these to work in Chrome.
Node has it as I would naturally expect:
Are my expectations wrong? I would expect Chrome's output to match the node's output.
Thanks in advance for any hints 🙏🏻
Browser: Chrome, 5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Node: v23.1.0
date-fns: 4.1.0
@date-fns/tz: 1.2.0
The text was updated successfully, but these errors were encountered: