Javascript examples for Date:UTC
Create a date object using UTC time instead of local time:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {// w ww. ja v a 2 s. co m var d = new Date(Date.UTC(2012, 02, 30)); document.getElementById("demo").innerHTML = d; } </script> </body> </html>