How should I handle datetimes when the timezones are different?
Right now I have a locations table that saves gps coordinates for a user but the datetime is incorrect. For example it'll show them somewhere at 4pm but it's only 11am.
I have the projects timezone at utc and I'm trying to convert to America/Costa_Rica, for example one of the datetimes is 2023-04-26 19:50:36 but currently it's 1:54pm.
I'm using dayjs to show the date return dayjs(date).format('MMMM DD, YYYY h:mm A');
If I add a timezone to dayjs the time is still incorrect.
I'm not sure what I'm doing wrong. How can I fix it?