Currently working on an addon that will take a list of links and insert them into the database.
I have tried setting link_updated in my array prior to sending the call to insert or update a new link, but link_updated never gets set. It always remains at its default value.
I have confirmed that the date I’m trying to set is accurate and not null (and is in the correct format for the db ex: 2011-04-07 00:00:00).
$linkdata = array(
"link_url"=> $link, // varchar, the URL the link points to
"link_name" => $title, // varchar, the title of the link
"link_target" => '_blank', // varchar, the target element for the anchor tag
"link_description" => $desc, //varchar a short description of the link
"link_visible" => 'Y', // varchar, Y means visible, anything else means not
"link_owner" => '1', // integer, a user ID
"link_updated" => $fullDate, // datetime, when the link was last updated
"link_category" => $term_id // int, the term ID of the link category. if empty, uses default link category
$link_id = wp_insert_link( $linkdata ); //insert or update our link
Everything gets inserted or updated as expected, except for the date.