PHP
php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php date_default_timezone_set('Asia/Calcutta'); ?>
<html>
<head>
<title></title>
</head>
<body>
<p id="t"></p>
<script type="text/javascript">
var date = new Date(<?php echo time() * 1000 ?>);
function time() {
date.setTime(date.getTime() + 1000);
document.getElementById("t").innerText = date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds();
}
window.onload = function() {
time();
setInterval('time()', 1000);
};
</script>
</body>
</html>
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run