setUTCHours() 예제
<button onclick="homzzang()">클릭</button> <p id="demo"></p> <script> function homzzang() { var d = new Date(); d.setUTCHours(23); document.getElementById("demo").innerHTML = d; } </script> 결과보기
<button onclick="homzzang()">클릭</button>
<p id="demo"></p>
<script>
function homzzang() {
var d = new Date();
d.setUTCHours(23);
document.getElementById("demo").innerHTML = d;
}
</script>
결과보기
결과값: Wed Jul 31 2019 23:52:45 GMT+0900 (한국 표준시)