Javascript examples for Date:setUTCHours
Set the time to 15:35:01 UTC time
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {//from www .jav a 2 s.c om var d = new Date(); d.setUTCHours(15, 35, 1); document.getElementById("demo").innerHTML = d; } </script> </body> </html>