WP Twitter Feeds local time

https://wordpress.org/support/topic/time-stamps-wrong

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.

カテゴリー: wordpress パーマリンク

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です