WordPress.org

Ready to get started?Download WordPress

Forums

Tweets As Posts
Time Zone problem? A simple solution (3 posts)

  1. ppriede
    Member
    Posted 1 year ago #

    Well, first thins first
    Great Plugin, just what I was looking for...and works great...

    Well, I was to post a problem (well, two problems, but the other will be another post), but i found the solution

    So, the update are every 30 minutes, so the post will get the real time (about line 99 in tweets-as-posts-class.php)
    But in my case, my time zone is different from the timezone of my server
    So, I have -3, and when I want to update my post... the post get "scheduled" for +3 hours
    So is not working properly

    Solution?
    in line 97 change this...

    // Add individual Tweet data to array
                    $post["date"]                   = date("Y-m-d H:i:s",strtotime($item->get_date()));

    to this...

    // Add individual Tweet data to array
                    date_default_timezone_set(get_option('timezone_string'));
                    $post["date"]                   = date("Y-m-d H:i:s",strtotime($item->get_date()));

    Thanks to this post for the inspiration
    http://wordpress.org/support/topic/display-dates-in-configured-timezone?replies=2

    And again, great plug in.

    http://wordpress.org/extend/plugins/tweets-as-posts/

  2. Chandesh Parekh
    Member
    Plugin Author

    Posted 1 year ago #

    Hi ppriede,

    Many thanks for that solution and thanks for using the plugin :-)

    Regards,
    Chandesh.

  3. kevintucker
    Member
    Posted 1 year ago #

    Great plugin, great fix for the time zone issue. Thanks guys!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic