bbPress Unread Posts
different timezones in $topicLastActiveTime and $lastVisitTime (2 posts)

  1. Fee
    Posted 3 years ago #

    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


  2. Fee
    Posted 3 years ago #

    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()


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • bbPress Unread Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic