The Arcive of vBulletin Modifications Site. |
|
Setting Time? Details »»
|
|||||||||||||||||||||||||
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); } Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
replace:
fwrite($shouts,$username."|".$shout."|".time()."|" .$ip."\n"); with: $uktime=time() +18000; fwrite($shouts,$username."|".$shout."|".$uktime."| ".$ip."\n"); 18000 is 5 hours in seconds. |
|
#3
|
||||
|
||||
|
Thanks,
Works a treat |
![]() |
|
|