Saturday, 29 July 2023

How do I convert and display a UTC DateTime to the browsers local time?

I need to show a UTC date time in the users browser as the users(browser) local time.

Ex. 04:52 UTC -> 09:52 PST (if browser/user is in Los Angeles)

as PST is -7 hours from UTC

I have no requirement, it can be done in Javascript, typescript, or using Luxon, which I currently use across my project.



from How do I convert and display a UTC DateTime to the browsers local time?

No comments:

Post a Comment