Code for a digital UTC (with timezones) + local time clock in webflow?

Anyone have any custom code JS for creating a local clock and clock with UTC timezone? Idea is to show users local time of the site viewer and the local time of the sites location.

Would like time in 24 or 12 hour format

24hr - HH:MM:SS
12hr - HH:MM:SS AM/PM

Thanks!

I’ve found a few articles, but can’t seem to get the custom code to work.


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

@niroshan - I have built countdown timers where the launch time is shown based on the local users time zone including daylight savings time. This was accomplished using Moment.js and Moment Timezone. Your use case would be much simpler to implement.

See → https://momentjs.com/

1 Like

Great, this looks awesome!

How would I configure a set time for a specific timezone? Lets say I want Hong Kong time to be displayed all the time and then local user time as well?

The documentation is very complete so I won’t repeat it here. If you want programming assistance that is something I can do for a fee or you could post to the freelance category.

Hey! I know this is an older post, but for those still looking.

We have a solution for this through our Booster attributes.

It uses UTC, and you can add it with just a few attributes.

Cheers! :smile: