zawan_na
asked 9 years ago

when posting a question it shows the question posted 5 hours ago .how to correct this 

1 Answers
DominicStaff
answered 9 years ago

I have checked this issue on our demo and it’s bug come from our  the plugin. To resolve this issue, you can do as the following:
In /templates/content-question.php change this line:

$time = human_time_diff( get_post_time( 'U' ) );

to this:

$gmt_timestamp = get_post_time( 'G', true, $post );
$time = human_time_diff( $gmt_timestamp );

2. In /templates/content-single-question.php find the line

<div class="dwqa-question-meta">

Create a new line immediately below that, and insert this:

<?php $gmt_timestamp = get_post_time( 'G', true ); ?>

Then find the code

human_time_diff( get_post_time( 'U' ) )

and replace it with

human_time_diff( $gmt_timestamp )

3. Find /templates/content-single-answer.php and make the same fixes as in/templates/content-single-question.php
Also, we are checking and fixing this issue in the next version we will update and release it as soon as possible. 
Hope this helps!

Powered by DW Question & Answer Pro