Support » Plugins » post_date_gmt Reverts To Current Date

Viewing 1 replies (of 1 total)
  • Thread Starter WebTechGlobal

    (@webtechglobal)

    Solution

    What I thought, if we don’t apply…

    $my_post[‘post_date’] = date(“Y-m-d h:m:s”);
    $my_post[‘post_date_gmt’] = gmdate(“Y-m-d h:m:s”);

    To our post object when doing wp_insert_post the gmt date does not get set. Not sure if there is a good reason, I don’t know enough but it looks more like something missing from the wp_insert_post function.

    Strange thing is why does the 000-00-00 and so on, effect an update that does have the post_date_gmt set? Obviously it is ignored if the prior record is empty forthis column.

    Again is there a good reason for that to happen?

Viewing 1 replies (of 1 total)
  • The topic ‘post_date_gmt Reverts To Current Date’ is closed to new replies.