GMT Offset
-
I’ve been playing with bbPress for a few days and noticed that when I started posting the time was set all wrong and the posts I imported were dated wrong (only ones from that day).
Since I’m in South Australia (+9.5 GMT) I had set the gmt_offset option in the admin interface to 9.5 to accomodate my differences but it wouldn’t set the post date/time to my timezone when posting.
The only way around it was to modify the bb_current_time function and change this line:
$d = gmdate(‘Y-m-d H:i:s’);
to this:
$d = gmdate(‘Y-m-d H:i:s’, time() + 3600*(bb_get_option(‘gmt_offset’)+date(“I”)));
So that it actually uses the GMT offset.
Of course, doing this only means that current posts are displayed at the right time but previous ones are wrong because they’re all set to the current time when posted and the system then adds 9.5hrs onto them when being read.
I’m assuming either I’ve missed something in the config or the time option just isn’t using the gmt_offset value from the db for anything.
Can someone confirm or refute this please? I’d like to be able to change it back and do it the proper way if possible.
- You must be logged in to reply to this topic.