WordPress.org

Ready to get started?Download WordPress

Forums

wp_insert_post post_date_gmt problem (1 post)

  1. scrollpost
    Member
    Posted 2 years ago #

    I am auto posting into WordPress from RSS feeds.
    I can't set the post_date or post_date_gmt to the date in the RSS feed item.
    I have researched this but with no success.

    I read on this forum that WordPress wants the date in ISO 8601.

    I am capturing the data going into WordPress by also adding it to custom fields.

    The RSS feed contains the date as follows which I believe to be the standard format:
    Mar 16 2012 07:26:02
    After
    $my_post_date= gmdate('c', strtotime($rss_date));
    I get the following:
    2012-03-16T07:26:02+00:00

    Nevertheless I am still getting for post_date the time when the post was published by WordPress.

    Cheers
    Jack

Topic Closed

This topic has been closed to new replies.

About this Topic