As you can see in the image, I'm getting an array of dates from my API, which I need to show on the frontend, but in my actual timezone, which is America/Sao_Paulo. The problem is, I can't figure out how to do this using date-fns and date-fns-tz. I've had some tries, but with no success.
Example:
From
2020-10-18T21:00:00.000-03:00
To
2020-10-19T00:00
Some code I wrote, but didn't work:
const lastParsedDate = parseISO(dates[dates.length - 1])
const tzTime = utcToZonedTime(lastParsedDate, 'America/Sao_Paulo')
console.log(lastParsedDate, tzTime)