Page 1 of 1

Board / phpbb plugin .. change time?

Posted: Fri May 01, 2009 10:59 am
by 42blue
Hi,

i run my s9y on a US webserver with the board / phpbb comments plugin .. so if someone makes a new post it shows the Los Angeles time as posting time .. which is 9 hours after CET .. is there any way to change this?

the plugin uses the php "date" function and syncs with the servertime .. i assume ..

thanks :wink:

Matt

Re: Board / phpbb plugin .. change time?

Posted: Fri May 01, 2009 4:38 pm
by Mangek
Log in and go to configuration. Under Appearance and Options you'll find "Server time Offset".

Edit: Think I misread the question there...

I took a look at the file serendipity_event_forum.php and discovered this block of code starting on line 161:

Code: Select all

case 'timeformat':
$propbag->add('type', 'string');
$propbag->add('name', PLUGIN_FORUM_TIMEFORMAT);
$propbag->add('description', sprintf(PLUGIN_FORUM_TIMEFORMAT_BLAHBLAH, 'h:ia'));
$propbag->add('default',     'h:ia');
break;
which I can only assume is where the changes will be. Either that or on line 1275:

Code: Select all

'POST_DATE'			=>	date($this->get_config('dateformat')." ".$this->get_config('timeformat'), $post[0]['postdate']),
I can't really be of much help, I don't know what to do with it (or if I'm even sniffing around at the right place). Sorry for the misunderstanding. :)

Re: Board / phpbb plugin .. change time?

Posted: Mon May 04, 2009 9:46 am
by garvinhicking
Hi!

Maybe changing it with this could do:

Code: Select all

'POST_DATE'			=>	date($this->get_config('dateformat')." ".$this->get_config('timeformat'), serendipity_serverOffsetHour($post[0]['postdate'])),
Using this serverOffsetHour function should basically apply the offset calculations. Sadly I'm not a real timezone expert, so I don't know if this will be your intended output ;)

Regards,
Garvin

Re: Board / phpbb plugin .. change time?

Posted: Thu May 07, 2009 8:21 am
by 42blue
Hi Garvin and Mangek,

thanks for your ideas .. but your proposals had no effect ...

Is there a possibility to influence the date() function .. at the admin screen for the board plugin i can change the time format .. or a least to hardcode it in the php file

Translation not 1:1:
Timeformat
The time format for postings. It is used the PHP-Function date() (Default: "h:ia")
a forgotten .. S9y is a 1.3.1

Thank you!

Matt