WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Fee
    Member
    Posted 1 year 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

    http://wordpress.org/extend/plugins/bbpress-unread-posts/

  2. Fee
    Member
    Posted 1 year 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()

    Cheers

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags