Open oaleynik opened 1 week ago
Hi there ππ»
First of all - thanks for bringing timezones support to date-fns ππ»
date-fns
I'm pretty sure I missed something. However, I can't get these to work in Chrome.
// CHROME fromUnixTime(1732204800, { in: tz('America/Denver') }).toString() // 'Thu Nov 21 2024 18:00:00 GMT+0200 (Eastern European Standard Time)' new TZDate(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(new TZDate(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:
// NODE fromUnixTime(1732204800, { in: tz('America/Denver') }).toString() // Thu Nov 21 2024 09:00:00 GMT-0700 (Mountain Standard Time) new TZDate(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-7 format(new TZDate(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
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