Time in Latest Forum Posts Widget

Athlon
User w
User w
Posts: 12
Joined: Sun Feb 12, 2017 2:56 pm

Time in Latest Forum Posts Widget

Post 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/
Goofkop
User www
User www
Posts: 63
Joined: Sun Feb 26, 2017 8:33 am

Re: Time in Latest Forum Posts Widget

Post by Goofkop »

The time in my widget isn't the same as on my website of forum.
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Time in Latest Forum Posts Widget

Post by axew3 »

looking as soon to this
Athlon
User w
User w
Posts: 12
Joined: Sun Feb 12, 2017 2:56 pm

Re: Time in Latest Forum Posts Widget

Post by Athlon »

Thank you - I look forward to a solution.
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Time in Latest Forum Posts Widget

Post 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?
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Time in Latest Forum Posts Widget

Post by axew3 »

p.s the above post has been edited with solution, that will be applied in auto on next last_topics.php fix.
Post Reply