`dayjs()` is not defaulting to local time, how can I default dayjs() to be local?

31 Views Asked by At

From The documentation, it states, By default, Day.js parses and displays in local time.. I live in New Zealand with GMT +12 or +13 depending on daylight savings. When creating a dayjs() with the following dayjs('2024-02-18'), the result is, Sat, 17 Feb 2024 11:00:00 GMT. These days do not match up. I am looking for dayjs(...) to default to local time as stated on the documentation. Could anyone assist me on why is it not working as expected?

0

There are 0 best solutions below