main top header image show network and world montage
clear spacer image
Main Menu
Home
News
About Us
Tutorials
Forums
Contact Us
Newsletter
Search
Recommend Us
Tools Menu
Order Web Hosting
Register Domain Name
Transfer Domain Name
Who Owns Domain?
Domain Suggestions
Manage Domain Name
Search Engine Submit
Free Files
Submit Trouble Ticket
 


clear spacer image Home arrow Forums
support
Admin

Admin
Posts: 4
graphgraph
Karma: 0  
Setting PHPNuke Time Zone - 2005/12/15 23:53 We receive a lot of support requests concerning this topic, and I have been meaning to post a message about it.

We have servers located at 2 different network operations centers for redundancy. Those NOC centers are in different time zones. We also have customers all over the world, therefore, our servers time will be different than your local time unless you live in either CST or EST.

We usually have several support tickets each week concerning adjusting the phpnuke series web sites time zones to local time.

This is how it is done:

First, download the time.php.zip file from our download archives. You will need to extract the file using winzip (windows) or unzip (linux). It will extract a file called time.php

Upload the time.php file to the root of your web site, usually public_html or www. You should now be able to check the exact time on the server by going to http://yourdomain.com/time.php (dont forget to replace yourdomain.com with your actual web site domain name)

Check the time of your computer and compare it to the time the url above shows.

Here is how to adjust the time in PHPNuke:

You can offset the time by tweaking the following line in the mainfile.php in the function formatTimeStamp:

Code:

 $datetime strftime(""._DATESTRING.""mktime($datetime[4],$datetime[5],$datetime[6], $datetime[2],$datetime[3],$datetime[1]));



For example to add one hour (3600 seconds), you would simply add 3600:

Code:

 $datetime strftime(""._DATESTRING.""mktime($datetime[4],$datetime[5],$datetime[6], datetime[2],$datetime[3],$datetime[1]) + 3600);



or, to subtract two hours:

Code:

 $datetime strftime(""._DATESTRING.""mktime($datetime[4],$datetime[5],$datetime[6], $datetime[2],$datetime[3],$datetime[1]) - 7200);



To reflect the new time zone that may be implied by the hardcoded time offset, you would also want to change the _DATESTRING definition in your language file, e.g. language/lang-english.php:

Code:

 define("_DATESTRING","%A, %B %d @ %T %Z"«»);



You can change the "%A, %B %d @ %T %Z" string to whatever you deem appropriate. PHP gives to some placeholders a special meaning, see the PHP manual page for strftime. If you want all articles to show GMT instead of EST/CST (depending on which server and NOC center you are located), simply change the %Z in the code above to GMT and adjust the clock + or - accordingly.

Post edited by: support, at: 2005/12/16 00:06
Technical Support
Xtreme Web Hosts
http://www.xtremewebhosts.com

---------------------------------
To expedite any support issues or questions, please Submit a Trouble Ticket All support tickets are answered in the order they are received.
  | | The administrator has disabled public write access.

      Topics Author Date
    thread link
Setting PHPNuke Time Zone
support 2005/12/15 23:53
Professional Web Site Design & Hosting Service - References Available by Request

© 2010 Xtreme Web Hosts - Professional web site hosting, business website hosting and domain names
Joomla! is Free Software released under the GNU/GPL License.
Today is:   Monday, 06 September 2010 05:54