I am using a plugin to create wordpress posts from a twitter feed, and I am trying to edit it so the published time is the same as the tweeted time, rather than the time the cron was run.
Unfortunately, twitter's API returns an already formatted date string, instead of a timestamp, so I am having to parse it and then save it in a wordpress friendly format.
// Wed Jun 06 20:07:10 +0000 2012 (Twitter formatted date example)
// 2014-03-10 18:30:26 (Wordpress formatted date example)
$tweet_date = $tweet->created_at;
$tweet_date = date_create_from_format("D M d h:i:s O Y", $tweet_date);
$tweet_date = date("Y-m-d h:i:s", $tweet_date);
Unfortunately, all I am getting from this the Unix Epoch (Jan 1st, 1970).
I know I must be missing a step, but I can't figure out where.