Bug fix for incorrect timestamps
-
This issue was reported in a previous thread, but it no longer allows replies. So, I’m re-reporting it here, along with the fix from kandersonus.
Issue: timestamps shown in the view are wrong, even when the server time, PHP timezone, and WordPress timezone are set properly.
Cause: Twitter reports tweets in GMT. If you’re making a comparison to the WordPress time (when it has a proper timezone set in General Settings), you have to account for that when calling
current_time()
.Fix: Add a second parameter of
1
to thecurrent_time()
calls in the following places:controller/twitter_widget.class.php Line 317
$timeDisplay = twitter_time_diff($t['time'], current_time('timestamp', 1));
./controller/twitter_widget.class.php Line 319
$timeDisplay = human_time_diff($t['time'], current_time('timestamp', 1));
Would appreciate this fix being applied as soon as you have a chance to do so. Thanks!
- The topic ‘Bug fix for incorrect timestamps’ is closed to new replies.