Hi all,
I'm using a little chat-script on my site. It's working well. The only problem is that times are shown as GMT, which is 2 hours behind my local time (The Netherlands). Any suggestions how to display the right time when someone posts something? I pasted the code below:
if(file_exists($filename)){
$number_of_messages = 20;
$fd = fopen($filename,"r");
for($i = 1; $i <= $number_of_messages; $i++){
$nick = fgets($fd, 512);
$datestamp = ereg_replace(" 0", " ", gmdate("d M Y - H:i:s", fgets($fd, 20)));
$message = fgets($fd, 1024);
if($nick){
echo "<b>*</b> <font color=\"#000099\">Gepost door <b>".$nick."</b> op ".$datestamp."</font><br>".stripslashes($message)."<br><br>";
}
}
echo "</font>";
fclose($fd);
}else{
echo "There are no messages yet.";
echo "</font>";
}
echo "</td></tr></table>";
Thanx for any help!