Javascript examples for Date Operation:Minute
Time Zone get local time
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){// ww w . j av a2 s . co m function calcTime(offset) { var d = new Date(); var utc = d.getTime() + (d.getTimezoneOffset() * 60000); var nd = new Date(utc + (1000*offset)); document.getElementById("output").innerHTML = "The local time is " + nd.toLocaleString(); } calcTime(-28800.0); } </script> </head> <body> <p id="output"></p> </body> </html>