List Available Time Zone Using Moment.js

A Time Zone is a region of the globe that observes a uniform standard time for legal, commercial, and social purposes. It plays an important role on our day to day life, Where based on the time zone we are calculating the date and time for different countries and regions.

Web applications are globalized, people from different country/region will use the web application at one instant. In this case the time should various based on peoples in different region. There are various libraries and modules available on the internet to calculate date/time based on timezone. In this article we are going to discuss about time zone Using Moment.js

Moment.js is a JavaScript library for working with dates and times. It was designed to work both in the browser and in Node.js. Here we have moment code snippet for both server and browser.

List Time Zone In Server(Node.js)

List Time Zone In Browser(JavaScript)

Here, we get the list of time zone name using moment and append into the select box. click here to check the demo of Dynamic Time Zones Dropdown Using Moment.js

Please leave your valuable comments/suggestions/feedback on below comment box if any.

Thank You !!

Leave a Reply

Your email address will not be published. Required fields are marked *