Publication date of Question “3 hours ago”, the date of publication of the comment “1 minute ago”, although they are published at one time. After 3 hours the publication date of the Question “1 minute ago” and the date of publication of the comment “3 hours ago”. How to fix it?
To resolve the time issue on your site you can do the following solution:
About list question page, you can open the content-question.php file, find line 17.
Replace it with the following code:
$time = human_time_diff( get_post_time( 'U' ), current_time('timestamp'));
you can open the content-single-question.php file and find the line 19.
Replace the following code:
<?php printf( __( '<span>%s%s %s asked %s ago</span>', 'dwqa' ), dwqa_get_author_link( $user_id ), get_avatar( $user_id, 48 ), dwqa_get_author(), dwqa_print_user_badge( $user_id ), human_time_diff( get_post_time( 'U' ) ) ) ?>
With new code:
<?php printf( __( '<span>%s%s %s asked %s ago</span>', 'dwqa' ), dwqa_get_author_link( $user_id ), get_avatar( $user_id, 48 ), dwqa_get_author(), dwqa_print_user_badge( $user_id ), human_time_diff( get_post_time( 'U' ), current_time('timestamp') ) ) ?>
Your solution does not work. May be I not correctly formulated a question.
The problem is that posting a question does not match the time set on the website
The time of publication of the issue does not match the time set on the website
Please send me username & password of your site for further checking, I will help you resolve it.
http://www.proinzhenerku.ru
Username: vrndorvc
password: ZninPir{)pROwagon}
I have helped you resolve this issue, you can check your site now.
compare:
http://proinzhenerku.ru/dwqa-questions/ (here the time of publication of the issue is incorrect)
http://proinzhenerku.ru/question/demo-time/
Right now, you can check your site, I have fixed it.
Yes, but I now need a new POT file.
Also I would like to know what happens after updating the plugin. Your changes will be saved?
you can download the new POT file here: https://www.dropbox.com/s/digio58nqwsyb7w/dwqa.pot?dl=0
About the time issue, we will update it in the next version. Or you can go to your theme folder and create a new folder , named it “dwqa-templates” .
Inside your new folder, you can copy/paste the “question-submit-form.php, content-comment.php, content-question.php, content-single-answer.php, content-single-question.php. file into the new folder.
all the change will be saved.
Please login or Register to submit your answer