Skip to:
Content
Pages
Categories
Search
Top
Bottom

BP Timezones


  • user1408
    Participant

    @user1408

    Hey @shanebp I am using your plugin BP-Timezones and I would like a little assistance if possible. On the player profile, it displays the timezone he has set, but I also would like to display the current time at the moment. And I do not know any filters to include the function you use. I would be happy if you can help me. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

  • shanebp
    Moderator

    @shanebp

    Try something like:

    $member_zone = bp_get_member_profile_data('field=Time Zone');
    $member_current_date = new DateTime("now", new DateTimeZone( $member_zone ) );
    echo $member_current_date->format('Y-m-d H:i:s');

    Thorsten :-)
    Participant

    @per4mance

    Hi @shanebp,

    where do I have to post the snippet? Within the bp-timezones.php? If yes which line?

    Thank you for advice.

    Best regards,
    Thorsten


    Thorsten :-)
    Participant

    @per4mance

    Hi @shanebp,

    where does your plugin have an effect on? Tested with two users with different timezones but each message shows me the same clock time.

    Is it still compatible with BP v2.5.2?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar