Page 1 of 5

Time in Latest Forum Posts Widget

Posted: Sun Mar 05, 2017 6:38 pm
by Athlon
It's pulling GMT time from my forum's database Unix time stamp.

Can it show the time based in my user's location instead?

http://warhawksclan.com/wordpress/

Re: Time in Latest Forum Posts Widget

Posted: Sun Mar 05, 2017 7:34 pm
by Goofkop
The time in my widget isn't the same as on my website of forum.

Re: Time in Latest Forum Posts Widget

Posted: Mon Mar 06, 2017 3:48 pm
by axew3
looking as soon to this

Re: Time in Latest Forum Posts Widget

Posted: Mon Mar 06, 2017 3:51 pm
by Athlon
Thank you - I look forward to a solution.

Re: Time in Latest Forum Posts Widget

Posted: Mon Mar 06, 2017 4:01 pm
by axew3
i will take a look but in the while i've just open the file
views/phpbb_last_topics.php
on plugin folder to see.

The time of the post is passed as is (timestamp) to wp function:

Code: Select all

date_i18n( 'H:i Y-m-d', $value->topic_last_post_time )
it is repeated for each last topics condition.
but maybe should be switched to:

Code: Select all

date_i18n( $dateformatstring, $unixtimestamp, $gmt );
adding the parameter about correct gmt or utc time.

https://codex.wordpress.org/Function_Re ... /date_i18n

if nothing else wrong so, that i will check, should be quite easy to resolve.

it seem to me there is a time difference about hours, nothing else?

Re: Time in Latest Forum Posts Widget

Posted: Mon Mar 06, 2017 4:08 pm
by axew3
p.s the above post has been edited with solution, that will be applied in auto on next last_topics.php fix.