Time of System
This will help you to get the time according to you.
if we want to get the time from time(); function then it will give us the GMT time.
but we need our local time.....
Time of India....
< ?php
$h=date("h");
$m=date("i");
$s=date("s");
$h=$h+5;
$m=$m+30;
if($h>24)
{
$h=$h-24;
}
if($m>60)
{
$h=$h+1;
$m=$m-60;
}
echo $h.":".$m.":".$s;
?>
Here $h is hour,$m is minut and $s is second....
This will help you to get the time according to you.
if we want to get the time from time(); function then it will give us the GMT time.
but we need our local time.....
Time of India....
< ?php
$h=date("h");
$m=date("i");
$s=date("s");
$h=$h+5;
$m=$m+30;
if($h>24)
{
$h=$h-24;
}
if($m>60)
{
$h=$h+1;
$m=$m-60;
}
echo $h.":".$m.":".$s;
?>
Here $h is hour,$m is minut and $s is second....
1 comments:
tell me code count of website viseter in php
Post a Comment