WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp-mail posting future date(timestamp) ..thoughts? (3 posts)

  1. RenoJohn
    Member
    Posted 5 years ago #

    SHORT STORY:
    all wp-mail posts are stamped 16hours in the future.

    LONG STORY
    using new install of 2.7

    WP-Mail is posting time 16hours in the future (i'm -8 gmt) so maybe the 16 is not total fluke (24-8=16)(?). I've run mail through different mail servers in different time zones and consistently get the 16hours in the future timestamp on all posts. All web based posts are perfect ...it is only post via email (wp-mail)

    I've spent the last day searching and can find other instances of folks having similar problem but no cure -any thoughts very much appreciated. Thank you from Reno ...John

  2. RenoJohn
    Member
    Posted 5 years ago #

    Well, I think I finally found in.

    In this line:

    $post_date = gmdate('Y-m-d H:i:s', $ddate_U + $time_difference);

    instead of + (adding) the difference, the time difference should be subtracted so I changed the plus (+) to a minus (-)
    to look like this:

    $post_date = gmdate('Y-m-d H:i:s', $ddate_U - $time_difference);

    seems to have done the job, hope this helps others.

  3. kevmac27
    Member
    Posted 5 years ago #

    YES!! Thank you!! I was pulling my hair out trying to find out what was happening. Edited the file as suggested and works great. I suppose that those that are + gmt won't need to make the change. I'm not a programmer, but I wonder if the problem is here:

    $time_difference = absint(get_option('gmt_offset')) * 3600;

    I would think that if the $time_difference was -8, then + a (-8) should work fine.

    But regardless, this took care of my issue, and I appreciate the help!

Topic Closed

This topic has been closed to new replies.

About this Topic