Skip to:
Content
Pages
Categories
Search
Top
Bottom

Regenerate BBPress post times


  • tech55541
    Participant

    @tech55541

    Hello,
    The other night I realized my site was set to the incorrect time zone. After fixing it all the BBPress times for new topics and replies was fixed, but for the old posts, it was still the old time zone. Is there anyway to update all topics/replies time stamp with the current time zone?

    Thanks.

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

  • tech55541
    Participant

    @tech55541

    Hello,
    Anyone? This is not custom coding for me, this is a possible bug, is anyone going to look?

    Thanks.


    Robkk
    Moderator

    @robkk

    this is a possible bug

    Not really, its just that when your post was posted it captured the then current post time into the post_meta table in your database for those specific posts. When you change your timezone it does not magically update other posts post date values to the current timezone.

    I don’t see the usefulness of changing certain topics that may have had a different post date that might be a few hours off, but I can see a reason for the reply posts in a conversation to be jumbled if you switched timezone and your new posts were posting before an originally made conversation.

    I can only think of right now is to possibly manually edit the post date time meta values for the specific posts in phpmyadmin, or possibly use some sql snippet for a group of posts in a certain time frame.

    In MYSQL with phpmyadmin you would be able to do it. If you would need to add e.g. 4 hours, the idea would be :

    WARNING: Backup your database before doing things
    WARNING: This is just a starting point, not a real query to launch on your DB

    UPDATE poststable SET postfield = DATE_ADD(postfield, INTERVAL 4 HOURS)
    WHERE postfield < '2016-04-01 08:20:00';

    So in the WHERE you need to put the datestamp when you have done the timezone switch.

    Pascal.


    tech55541
    Participant

    @tech55541

    Thanks.

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