Skip to:
Content
Pages
Categories
Search
Top
Bottom

Localize Reply Date Stamp


  • dmalkin
    Participant

    @dmalkin

    Having a really difficult time figuring out a way to output topic reply time stamps in a users local timezone. I have a forum with global users and this is a necessity.

    WP version: 4.9.8
    bbPress version: 2.5.14

    Currently using this plugin: Localize Time (https://wordpress.org/plugins/localize-time/)

    I am wrapping the bbp_get_reply_post_date() with the shortcode [localize_time]; however, I cannot alter the format of the output date from the shortcode.

    I need an alternate solution.

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

  • dmalkin
    Participant

    @dmalkin

    // Time Variable
    $localTime = str_replace('at ', '', $localTime);
    
    $localTime = do_shortcode('[localize_time before_local=" " after_local=" " fmt="F j, Y g:i a"]'.$localTime.'[/localize_time]');
    echo $localTime;
    

    punkum
    Participant

    @punkum

    Did you get this sorted? If so, please share the fix.
    Even with the wrong date format – it would be better than no local time at all.
    Please let me know.
    cheerio,
    Fiona

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