date add 6 hour js code example
Example 1: jquery get 2 hours frmo now
<html>
<head>
<title>JavaScript setHours Method</title>
</head>
<body>
<script>
var dt = new Date();
dt.setHours( dt.getHours() + 2 );
document.write( dt );
</script>
</body>
</html>
Example 2: add 2 for hours in date timestamp js
Date.prototype.addHours= function(h){
this.setHours(this.getHours()+h);
return this;
}
alert(new Date().addHours(4));