Get current date with timezone in javascript

Something Like that:
Mon Jul 24 2017 12:24:49 GMT+0530 (India Standard Time)

For that you need to create first html code.

HTML

<p id="demo"></p>

After that add this JS code.

JS

document.getElementById("demo").innerHTML = Date();

[codepen_embed height=”265″ theme_id=”0″ slug_hash=”MvWpjZ” default_tab=”js,result” user=”pradeepanvi”]See the Pen Get current date with timezone in javascript by Pradeep Kumar (@pradeepanvi) on CodePen.[/codepen_embed]

Leave a Reply

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