/    Sign up×
Community /Pin to ProfileBookmark

Convert HTML text times relative to time zone

I have a simple HTML page with a list of online courses running at different times. Like a course schedule. To make it easy for users, I would like the HTML page to allow the users to:

**1)** Select their time zone from a pulldown list.
**2)** Then the HTML text times (inside HTML table) assigned per each course to show the demo time after it is adjusted to the user’s selected local time zone.

I hope you can help me and I appreciate it if there is a sample.

to post a comment
HTMLJavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@NachfolgerSep 29.2020 — Although you can achieve this with vanilla JS, I would take a look at Moment.js (https://momentjs.com/timezone/). HTML alone cannot do this, I trust you know that.

In general, this isn't a massive task--Assuming the current dataset you have (The course listings) has the timezone in it, Moment.js can handle this relatively easily.
Copy linkTweet thisAlerts:
@VITSUSASep 30.2020 — @zema#1623774

I agree with Nachfolger, with the help of only HTML you cannot do this. You can do this with the help of Moment.js easily.
Copy linkTweet thisAlerts:
@mavisakinsNov 05.2020 — Thank you very much for your reply !! It is very valuable.
Copy linkTweet thisAlerts:
@siddhi_patelNov 09.2020 — only using HTML you can't do it using "JS" you can do it easily JS has some functions for time zone so it is easy to use.
×

Success!

Help @zema spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...