<!DOCTYPE html>
<html>
<body>
<p>Click the button to display the day of the week, according to UTC.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var d = new Date();
var n = d.getUTCDay();
document.getElementById("demo").innerHTML = n;
}
</script>
<p><strong>Note:</strong> 0=Sunday, 1=Monday, etc.</p>
</body>
</html>