WordPress.org

Support

Support » How-To and Troubleshooting » post_date question

post_date question

Viewing 5 replies - 1 through 5 (of 5 total)
  • I recommend using the date_created_gmt field. This will set the date/time for the post and is always GMT.

    Hi thnx Joseph!

    But when i use :

    $pubdate =”2010-07-28 19:36:04″;

    then other code of my page :

    $content = array(
    ‘title’=>$title,
    ‘description’=>$body,
    ‘date_created_gmt’=>$pubdate,

    );

    It still doens’t work… Is it the wrong format in my variable ? I Now get the error :
    -32700 : parse error. not well formed

    Thnx for your help!

    Sounds like you didn’t use dateTime.iso8601 format. Also take a look at the raw XML, often a parse error like that will stand out with a visual inspection.

    Thnx I found a working code :p

    $pubdate =strtotime(‘2009-08-102009-08-31 12:17:25’);

    But when i use with :

    ‘date_created’=>$pubdate,
    ‘post_date’=>$pubdate,

    ‘post_modified’=>$pubdate,
    ‘post_modified_gmt’=>$pubdate,

    I go to my post and the timestamp automaticly changed the date to the current date…

    When i go to my database the date rows (date_created,…) are different from the ‘published on’ date in my blogpost…. So how do set the published date…

    Thnx for the help! Hope you understan my bad english :p

    greetings

    Stick with the date_created_gmt field.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘post_date question’ is closed to new replies.
Skip to toolbar