ホームページをリニューアルしました。旧HPはこちら
wordpress

WP Twitter Feeds local time

Time Stamps Wrong
Time Stamps Wrong SweetMewsic (@sweetmewsic) 10 years, 4 months ago The Twitter feeds showing up on my website with this plugin are four hours off. Both Twitter...

kandersonus
Member
Posted 1 year ago #

Cause: Twitter returns GMT but the difference is calculated using local time.
Resolution: Add 1 for the GMT parameter to the current_time() calls:

./controller/twitter_widget.class.php Line 316
$timeDisplay = twitter_time_diff($t['time'], current_time('timestamp', 1));

./controller/twitter_widget.class.php Line 318
$timeDisplay = human_time_diff($t['time'], current_time('timestamp', 1));

There are other instances of this in ./slider.php and ./views/slider.php.

コメント

タイトルとURLをコピーしました