NukeXchange Network

          

NukeZone Hosting - Fast, Affordable and Dependable
Nuke Fixes · NukeForums · NukeZone Hosting · NukeUnited · Nuke Sites · Nuke Skins · NukeLance
Nuke Resources
 :: Home  :: Downloads  :: Your Account  :: Forums  :: Advertise :: 
Login or Register
Main Menu
General
 Main
 AvantGo
 Banner_Clients
 cfaq
 Donations
 Downloads
 Forums
 Members_List
 Private_Messages
 Search
 Stories_Archive
 Submit_News
 Surveys
 Topics
 Web_Links
 Your_Account

Your Account
 Login
 Register
 Lost Pass

Modules
Quick Links
· CMS Focus
· Domain Names
. Game Quest
· Learning Linux
. MateMaker
· NukeFixes
· NukeForums
· NukeLance
· Nuke Sites
· Nuke Skins
· NukeZone Hosting
. SearchDevil
Other Options

Download Resources
· Nuke Downloads
· Add a Link
· New Files
· Top Rated
· Most Popular

Web Site Resources
· Nuke Sites
· Add A Site
· New Sites
· Top Rated
· Most Popular

Support
· NukeZone Hosting
· NukeSkins.com
· NukeForums.com
· phpnuke.org
· NukeFixes.com
Information
NukeForums
·decompressing EN-Book-Nuke.tar.tar
·How to allow spaces/gaps/"-" in allowed usernames
·How to Setup PHPNUKE on win2k
·cannot save changes
·voting?
·Nuke forum picture problem
·How to change smtp port on wampserver and windows
·yet another 301 redirect problem
·Image display? - newbie
·php nuke help

read more...
Top10 Links
· 1: Nuke Forums
· 2: PHPNukeFiles
· 3: NukeSkins
· 4: Nuke Templates
· 5: EcomJunk
· 6: MDesign
· 7: Windows Installation: PHP
· 8: FLASH-FOR-NUKE
· 9: Dezina
· 10: Global Dream News Sharing Portal!
Site Visitors
User Login:

Nickname:
Password:
Security Code: Security Code
Type Security Code Here:

Members List Membership:
Latest: GiLli
Today: 2
Yesterday: 1
Overall: 15104

Visitation:
Guests: 497
Members: 1
Total: 498


You are Anonymous user. You can register for free by clicking here
Sponsor Links
Nuke Sites Link Directory
Nuke Sites Link Directory

NukeResources :: View topic - server time wrong
NukeResources Forum Index

NukeResources Forum Index -> Bug Fixes -> server time wrong
Post new topic  Reply to topic    View previous topic :: View next topic 
server time wrong
PostPosted: Fri Apr 07, 2006 10:37 am Reply with quote
ipd56
Resource Seeker
Resource Seeker
 
Joined: Apr 07, 2006
Posts: 10




Can some 1 help i running phpnuke 7.9 and i am in the uk the server in the usa as the code has been updated the old fix does not work to change the server time in the mainfile.php file any help thx Wink
View user's profile Send private message
PostPosted: Fri Jun 09, 2006 2:21 pm Reply with quote
Dove
Resourceful
Resourceful
 
Joined: Mar 17, 2004
Posts: 140
Location: USA




http://www.nukeresources.com/ftopict-3502.html
View user's profile Send private message
PostPosted: Fri Jun 09, 2006 4:58 pm Reply with quote
ipd56
Resource Seeker
Resource Seeker
 
Joined: Apr 07, 2006
Posts: 10




thx but this does not work for phpnuke 7.9
View user's profile Send private message
PostPosted: Fri Jun 09, 2006 6:33 pm Reply with quote
Dove
Resourceful
Resourceful
 
Joined: Mar 17, 2004
Posts: 140
Location: USA




hmm just tested it on 7.9 and it worked for me. Smile
View user's profile Send private message
PostPosted: Sat Jun 10, 2006 11:37 am Reply with quote
ipd56
Resource Seeker
Resource Seeker
 
Joined: Apr 07, 2006
Posts: 10




my code is not the same and looks like his:-


// Beta 3 code by Quake 08/19/2005
// Written for Nuke-Evolution and Nuke Patched
function formatTimestamp($time) {
global $datetime, $locale;
setlocale(LC_TIME, $locale);
if (!is_numeric($time)) {
preg_match('/([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);
$time = gmmktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]);
}
$time -= date("Z");
$datetime = strftime(_DATESTRING, $time);
$datetime = ucfirst($datetime);
return $datetime;
}
View user's profile Send private message
PostPosted: Sat Jun 10, 2006 12:37 pm Reply with quote
Dove
Resourceful
Resourceful
 
Joined: Mar 17, 2004
Posts: 140
Location: USA




Hello,
Sorry yours was patched Smile good job!
Change where it says:
Code:
gmmktime($datetime[4],

to --> adding + or - whatever about of time you need added or subtracted
Example to add 12 hours (+12)
Code:
gmmktime($datetime[4]+12,


So then the entire thing would look like this:
Code:

// Beta 3 code by Quake 08/19/2005
// Written for Nuke-Evolution and Nuke Patched
function formatTimestamp($time) {
    global $datetime, $locale;
    setlocale(LC_TIME, $locale);
    if (!is_numeric($time)) {
        preg_match('/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})/', $time, $datetime);
        $time = gmmktime($datetime[4]+12,$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]);
    }
    $time -= date("Z");
    $datetime = strftime(_DATESTRING, $time);
    $datetime = ucfirst($datetime);
    return $datetime;
}


Smile
View user's profile Send private message
PostPosted: Sat Jun 10, 2006 1:20 pm Reply with quote
ipd56
Resource Seeker
Resource Seeker
 
Joined: Apr 07, 2006
Posts: 10




i try that as well and no change as server in the usa and i am in the uk i can get the forum times right by using the control panel but the home page the forum on there are 5 hours out and vwarinfo block as well.
when i put in the changes not a thing happens.
View user's profile Send private message
PostPosted: Sat Jun 10, 2006 2:19 pm Reply with quote
Dove
Resourceful
Resourceful
 
Joined: Mar 17, 2004
Posts: 140
Location: USA




Sorry that was really just a work around for the news post time on the front page.

Evaders99 wrote:
Unfortunately the date is set to read the local server time. You would need to get the host to change the time.
View user's profile Send private message
PostPosted: Sat Jun 10, 2006 3:05 pm Reply with quote
ipd56
Resource Seeker
Resource Seeker
 
Joined: Apr 07, 2006
Posts: 10




cool thx for the help
View user's profile Send private message
PostPosted: Sat Jun 10, 2006 8:45 pm Reply with quote
darklord
Resourceful
Resourceful
 
Joined: Feb 25, 2006
Posts: 210




try this
+43200

its in seconds...so u wouldnt notice a difference if u only do 12...it would be 12 seconds added on...so try that and let us know...the mainfile sets the time for all modules( i believe)...it does set the time for the main site

_________________

for those who STAND shall NEVER fall and those who fall shall rise once more...never give up the end is just another beginning.
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
PostPosted: Sun Jun 11, 2006 12:26 am Reply with quote
ipd56
Resource Seeker
Resource Seeker
 
Joined: Apr 07, 2006
Posts: 10




it work for the news work a round on the home page i put in +5 and went i post news not the home page it add 5 hours with is good so i just got the forum on the home page to get to show the right time now Laughing
View user's profile Send private message
PostPosted: Sun Jun 11, 2006 12:27 am Reply with quote
ipd56
Resource Seeker
Resource Seeker
 
Joined: Apr 07, 2006
Posts: 10




it work for the news work a round on the home page i put in +5 and went i post news not the home page it add 5 hours with is good so i just got the forum on the home page to get to show the right time now Laughing
View user's profile Send private message
PostPosted: Sat Dec 09, 2006 8:56 am Reply with quote
geoff_bell
Resource Seeker
Resource Seeker
 
Joined: Dec 09, 2006
Posts: 1




find:
Code:
$time = gmmktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]);

replace with
Code:
$time = gmmktime($datetime[4]+6,$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]);

where +6 is the difference in hours between your local time and that of the server.

works for me. using 12 hours as an example could have been throwing you off mate.
View user's profile Send private message
server time wrong
 NukeResources Forum Index -> Bug Fixes
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
All times are GMT - 4 Hours  
Page 1 of 1