Convert UTC to local time zone in server action

Hi all,

I’m trying to send appointment reminder emails to my users but keep running in to issues with time zones. When a user books an appointment I store the appointment time along with their local time zone name and integer offset from UTC. I’ve been using just the integer difference to calculate their local time zone in the scheduled appointment reminder workflow. That worked all the way up until day light savings time.

What I’m thinking is using javascript and a library to convert the appointment time to their local time based off of the stored name, then sending the email but not sure how to do so.

Please let me know if any one has any suggestions on the best approach to this.

Thanks!

An API such as this may be a good solution.
https://worldtimeapi.org/