>>  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 Reason

---- The Solution
    Please Note: Backup Your Files And Database Before Changing Anything – You Have Been Warned

  1. 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);


  2. 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







Added Poll




Attention! You are currently viewing sitemap page!
We strongly suggest to look at original content

Search from web

Valid HTML 4.01 Valid CSS