date-fns-tz
date-fns-tz copied to clipboard
Complementary library for date-fns v2 adding IANA time zone support
Fixes https://github.com/marnusw/date-fns-tz/issues/195
Consider below test case and notice where the timezone should be, it shows the year instead: "HH:mm:ss z d MMMM, y" outputs "13:13:14 2019 11 tháng 01, 2019" ``` it('format...
zonedTimeToUtc ``` Sun Jul 09 2022 21:00:00 GMT+0000
i am using date-fns and also for time zones date-fns-tz. But when using formatInTimeZone method , angular giving CommonJS or AMD dependencies can cause optimization bailouts warning as depends on...
I've debugged my code for a long time, because my a particular test fails over and over again. The test case resolves around figuring out whether there is a switch...
While the library is working well on most parts. We recently started seeing error report on Sentry `Invalid time value` on some of the Android 6 devices. But we were...
On android 6. Month was coming as ``` { "type": "month", "value": "July" },``` instead of ``` { "type": "month", "value": "07" },```
```ts import { utcToZonedTime } from 'date-fns-tz' import config from './config' export function nowUTC(): Date { return utcToZonedTime(new Date(), 'Etc/UTC') } export function nowLocal(): Date { return utcToZonedTime(nowUTC(), config.timezone) }...
⚠️ I guess there is an issue regarding having DST change in both browser's time zone and selected time zone within the same day but happening in a different hour....
Given the following documentation (emphasis mine): > ### `formatInTimeZone` > > This function takes a `Date` instance in the system's local time or an ISO8601 string, and an IANA time...