Stu
09-07-2002, 11:17 AM
Hi,
How can I alter the code in ShoutBox so that it shows my local Time!
At the moment everything is all set to my local time except Shoutbox, when I make a shout the time is way off, I think it's picking up the server time.
I'm in the UK and my Server is in USA.
I think I found the code that needs altering, but dont know how.
in this function is Time() could I just use Time() and add 5 hours (dont know what the syntax would be though.
function saveShout ($username, $shout, $ip) {
global $csvfile;
$shouts = fopen($csvfile,"a");
$username = str_replace("|","",$username);
$shout = str_replace("|","",$shout);
$ip = str_replace("|","",$ip);
$username = trim($username);
$shout = censortext(trim($shout));
$ip = trim($ip);
fwrite($shouts,$username."|".$shout."|".time()."|".$ip."\n");
fclose($shouts);
}
How can I alter the code in ShoutBox so that it shows my local Time!
At the moment everything is all set to my local time except Shoutbox, when I make a shout the time is way off, I think it's picking up the server time.
I'm in the UK and my Server is in USA.
I think I found the code that needs altering, but dont know how.
in this function is Time() could I just use Time() and add 5 hours (dont know what the syntax would be though.
function saveShout ($username, $shout, $ip) {
global $csvfile;
$shouts = fopen($csvfile,"a");
$username = str_replace("|","",$username);
$shout = str_replace("|","",$shout);
$ip = str_replace("|","",$ip);
$username = trim($username);
$shout = censortext(trim($shout));
$ip = trim($ip);
fwrite($shouts,$username."|".$shout."|".time()."|".$ip."\n");
fclose($shouts);
}