-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtry.php
More file actions
44 lines (33 loc) · 754 Bytes
/
try.php
File metadata and controls
44 lines (33 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
</head>
<body>
<?php
// Asia/Kolkata is for INDIA
date_default_timezone_set('Asia/Kolkata');
$t = date_create("2022-04-15 17:46:50");
// showing current date and time of INDIA;
// echo date( 'd M Y | h:i', time ());
echo date_format($t,"d M Y | H:i");
$a = "10:00:00";
$b = "22:00:00";
$currentTime = "06:14:33";
// date("d M Y | H:i:s", time ())
if($a <= $b && $b >= $a)
{
echo "it works";
}
?>
<button onclick="clearr()">clear</button>
<script type="text/javascript">
localStorage.setItem("name", "nirved");
function clearr(){
localStorage.clear();
}
</script>
</body>
</html>