Author |
Message |
heavymo
New Member


Joined: Jul 07, 2004
Posts: 8
|
Posted:
Wed Jul 07, 2004 4:11 am |
|
hi all , well basically i have the time set properly on the phpbb to GMT +1 which say comes out to be 4:00 for example, the scrolling forum block gets the right posts and date but adds an hour to the time so it is infact GMT +2 so e.g 5:00 how can i sort this out because it has added some confusion with members.
thank you. |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Wed Jul 07, 2004 4:34 am |
|
This is not a block issue, unfortunately. The block does not add any time, it just does not adjust it as phpbb does. This is a phpnuke issue. Nuke does not allow for adjusting the server time which is what you are seeing. I would imagine you have the same issue with the time in your News stories unless you have modified code for that. |
|
|
|
 |
heavymo

|
Posted:
Wed Jul 07, 2004 4:55 am |
|
yep same problem so ive decided to remove the time from news and stories... so there is no way around this then? |
|
|
|
 |
Raven

|
Posted:
Wed Jul 07, 2004 5:02 am |
|
I collected this along the way but it may not be up to date with your version of nuke, but you can try the logic. Notice the -15? That, if I remember right, is the HOUR offset. Let me know if this works or not  Code:function formatTimestamp($time) {
global $datetime, $locale;
setlocale (LC_TIME, $locale);
ereg ("([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);
$datetime = strftime(""._DATESTRING."", mktime(($datetime[4]-15),$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
$datetime = ucfirst($datetime);
return($datetime);
}
|
|
|
|
|
 |
heavymo

|
Posted:
Wed Jul 07, 2004 5:08 am |
|
ive configured the time based on that script , so now i have correct story time , but scrolling forum block is unaffected.
is it possible to call the time From_ bb time at all?
thanks. |
|
|
|
 |
Raven

|
Posted:
Wed Jul 07, 2004 5:42 am |
|
Probably but I don't have any code to do that. Rather, I would just make a call to the function above and pass it the posting time from the block. It should come back adjusted correctly. |
|
|
|
 |
|