| Author |
Message |
slackervaara Worker


Joined: Aug 26, 2007 Posts: 234
|
Posted:
Mon Jun 28, 2010 11:04 am |
|
I have a PHP-Nuke 7.633 site that worked without problems for 7 years on the identical web hotel. One day last week the time was suddenly 2 hours behind, when posting news and in the forum center block. The time in forums posts and in Shoutbox were correct though.
I have contacted the web hotel, but they have not changed anything except upgrading to PHP 5.3, but it was some months ago and time was correct after that. I have not changed anything on the site prior to the time change.
For me it seems as the time locale in preferences in PHP-Nuke is not recognised correctly.
Grateful for input!
I have corrected the time in the forum center block by changing this line:
| Code: | | $result3 = $db->sql_query("SELECT poster_id, FROM_UNIXTIME(post_time,'%d/%m/%Y vid %H:%i') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'"); |
to this:
| Code: | $result3 = $db->sql_query("SELECT poster_id, FROM_UNIXTIME(post_time + 7200,'%d/%m/%Y vid %H:%i') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'");
|
|
|
|
|
 |
Susann Moderator

Joined: Dec 19, 2004 Posts: 3132 Location: Germany:Moderator German NukeSentinel Support
|
Posted:
Fri Aug 06, 2010 10:40 am |
|
I know this time issue only from one blog because the regged users number today and yesterday is somewhere 2 hours behind my time zone.
Glad you solved it. |
|
|
|
 |
slackervaara Worker


Joined: Aug 26, 2007 Posts: 234
|
Posted:
Fri Aug 06, 2010 8:35 pm |
|
To admin.php I added at the top the line:
| Code: | | date_default_timezone_set('Europe/Stockholm'); |
It caused the time for news in admin.php to become correct, but the time for posted news is still 2 hours behind. |
|
|
|
 |
Susann Moderator

Joined: Dec 19, 2004 Posts: 3132 Location: Germany:Moderator German NukeSentinel Support
|
Posted:
Wed Aug 11, 2010 7:03 am |
|
There are many entries how to change the time in news I just can´t find my best links about this problem anymore. Anyway here is one link you could check:
|
|
|
|
 |
slackervaara Worker


Joined: Aug 26, 2007 Posts: 234
|
Posted:
Wed Aug 11, 2010 11:34 pm |
|
Thanks! I have tried those fixes and I am not satisfied with them, because it makes the posting time for all my 7 years old news + 2 hours. I prefer to post news without this fix and manually change the time in nuke_stories after each new news post. |
|
|
|
 |
|
|
|
|