When we parse dates in dayjs.tz() with timezone we make time offset twice. So if the date string has timezone information better parse it in dayjs().
Before changes
dayjs("2024-09-30 12:43:00 +0300").format('LLLL z')
it returns the correct date: Monday, September 30, 2024 12:43 PM GMT+3dayjs.tz("2024-09-30 12:43:00 +0300").format('LLLL z')
it returns the incorrect date: Monday, September 30, 2024 9:43 AM GMT+3
time was offset twice.
After changes
dayjs("2024-09-30 12:43:00 +0300").format('LLLL z')
it returns the correct date: Monday, September 30, 2024 12:43 PM GMT+3dayjs.tz("2024-09-30 12:43:00 +0300").format('LLLL z')
it returns the correct date: Monday, September 30, 2024 12:43 PM GMT+3
time was offset once.
When we parse dates in dayjs.tz() with timezone we make time offset twice. So if the date string has timezone information better parse it in dayjs().
Before changes
dayjs("2024-09-30 12:43:00 +0300").format('LLLL z')
it returns the correct date:Monday, September 30, 2024 12:43 PM GMT+3
dayjs.tz("2024-09-30 12:43:00 +0300").format('LLLL z')
it returns the incorrect date:Monday, September 30, 2024 9:43 AM GMT+3
time was offset twice.After changes
dayjs("2024-09-30 12:43:00 +0300").format('LLLL z')
it returns the correct date:Monday, September 30, 2024 12:43 PM GMT+3
dayjs.tz("2024-09-30 12:43:00 +0300").format('LLLL z')
it returns the correct date:Monday, September 30, 2024 12:43 PM GMT+3
time was offset once.