>>
Site Map
>>
Forums
>>
PHP-Nuke Common Problems & Solutions
Forum module - topics in forum:
PHP-Nuke Common Problems & Solutions - <font color=red>Look Here First For Your Problems And Get Their Solutions.</font><br><br>See also <a href="http://phpnuke-uk.net/modules.php?name=PHP-Nuke_HOWTO&page=common-installation-problems.html"><b>this</b></a> section of the phpnuke howto.<br>
Setting PHPNuke Timezone
---- The Error
- The posting time for the News is not Correct.
---- The Reason
- This error is caused because the news posting time is not tied into the Forum or Admin -> Preferences Time Offset for some reason. So no matter how much you offset your time in those places it wont effect the News posting time.
---- The Solution
Please Note: Backup Your Files And Database Before Changing Anything – You Have Been Warned
- You can offset the time that shows up for the News stories in the mainfile.php. Find the following line (about line 567 in 6.0 and about line 740 in 6.5+):
| Code: : |
| $datetime = strftime(""._DATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1])); |
Just add a - 3600 (3600 x Number_Hours) or + 3600 (3600 seconds, which is 1 hour) like this:
| Code: : |
| $datetime = strftime(""._DATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]) - 3600); |
If like us here, there is a 5 hour difference, it will be +18000:
| Code: : |
| $datetime = strftime(""._DATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]) +18000); |
- In the language/lang-english.php (or appropriate language file) find:
| Code: : |
| define("_DATESTRING","%A, %B %d @ %T %Z"); |
You can use punctuation (or whatever) along with the different strftime symbols, and only the symbols will get converted to a time parameter.
The %A is the weekday, %Z is the time zone, etc ... you can see what the different symbols do here:
http://www.php.net/manual/en/function.strftime.php
NOTE: If no time is displayed ... some servers do not recognize the %T - you can use %H:%M:%S instead (if you want you can just delete the %Z, and replace it with EST, GMT or whatever)
---- Still Not Working
- If you find that you are still having problems please post up your specific problem in the Installation Forum and we will try to help

Added Poll