WordPress Code Snippets

A fresh mix of code snippets and tutorials

Display local time with JavaScript

72

Another oldie but goodie, here is a chunk of JavaScript code that will display local time in a variety of formats.

To understand how this works, create a blank HTML file and add the following slab of code:

Once included in your HTML file, visit it in a browser to see a nice assortment of “local time” output.

Source


Show Support

Like our new Facebook Page to show support!