Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Security - PHP Nuke
Author Message
providence
Regular
Regular


Joined: Apr 23, 2005
Posts: 95

PostPosted: Sun Apr 24, 2005 6:07 am Reply with quote

Hi does anyone here know if there is a way to change the time for phpnuke??
my time is way off. The one in the site is 13 hours behind my local time. my timezone is GMT +8 is there an easy way to change it?? thanks!
 
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Sun Apr 24, 2005 10:06 am Reply with quote

Do a forum search on 'time timezone' without the quotes
 
View user's profile Send private message
providence
PostPosted: Sun Apr 24, 2005 12:46 pm Reply with quote

thanks raven but i am having no luck, i've tried changing this code already

· How do I adjust the server time for News articles?

In mainfile.php, find the function formatTimestamp(). Assuming it resembles this code

function formatTimestamp($time) {
global $datetime, $locale;
setlocale (LC_TIME, $locale);
ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2})Sad[0-9]{1,2})Sad[0-9]{1,2})", $time, $datetime);
$datetime = strftime(""._DATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
$datetime = ucfirst($datetime);
return($datetime);
}

Modify it to this. Note the -15? That is the number of hours to offset the timestamp.

function formatTimestamp($time) {
global $datetime, $locale;
setlocale (LC_TIME, $locale);
ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2})Sad[0-9]{1,2})Sad[0-9]{1,2})", $time, $datetime);
$datetime = strftime(""._DATESTRING."", mktime(($datetime[4]-15),$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
$datetime = ucfirst($datetime);
return($datetime);
}

i did that, but it didnt change the time.. any suggestion??
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Security - PHP Nuke

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©