Support » Plugin: bbPress Unread Posts » different timezones in $topicLastActiveTime and $lastVisitTime

  • Hello Erlend,
    thanks for your useful plugin!
    In my install the two compared values of $topicLastActiveTime and $lastVisitTime work with different timezones. $topicLastActiveTime seems to use GMT, $lastVisitTime uses local server timezone (2 hours later in my case). So it doesn’t show the unread posts correctly.
    I think this can’t be changed without hardcoding your plugin…
    Would be nice if you could take a look into that.
    Thanks, Fee

Viewing 1 replies (of 1 total)
  • I got it, to work with time the same way as bbpress you have to change line 60 in function bbp_unread_posts_UpdateLastTopicVisit($topicID):
    update_post_meta($topicID, bbp_unread_posts_getLastVisitMetaKey(), strtotime( current_time( 'mysql' ) ));
    Use strtotime( current_time( 'mysql' ) ) instead of time()


Viewing 1 replies (of 1 total)
  • The topic ‘different timezones in $topicLastActiveTime and $lastVisitTime’ is closed to new replies.