date-fns-tz icon indicating copy to clipboard operation
date-fns-tz copied to clipboard

Unexpected behavior if offset present

Open polRk opened this issue 5 years ago • 0 comments

The value passes from third party package

const utcDate = zonedTimeToUtc('2020-05-14T10:00', 'Europe/Rome') // 2020-05-14T08:00:00.000Z

const utcDate = zonedTimeToUtc('2020-05-14T10:00+0300', 'Europe/Rome') // 2020-05-14T07:00:00.000Z

Can someone explain to me, this is how it should work ?

polRk avatar May 14 '20 07:05 polRk