关于PHP代码和重新调整时间

Why my php time is 4 hours slower than my pc? How can i fix this?

<?php
echo"<H2>it's my test program.</H2>I'll make it my own...<br>";
$string="Tell me the time.";
echo"$string <br>"; 
$string1="It's";
$t=date("H.i"); 
if($t<"18" and $t>"1"){
echo"$string1 evening and its $t.";
}
else{
echo"$string1 $t";
}
?>

and it was showing in mozila:

it's my test program. I'll make it my own... Tell me the time. It's 20.36 . But my laptop time is 2.36 am

My guess is that you're in the wrong timezone. Right now, Eastern time in the US is 4 hours different from Greenwich Mean Time. You can find out your timezone with this function, and set it with this one.

You can also set it in the php.ini:

date.timezone = "America/New_York"

For reference, here are a list of valid timezones.