﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
22063	wp_insert_attachment misses proper post_date_gmt filling	thomask		"wp_insert_post function contains this block

{{{
2550	        if ( empty($post_date_gmt) || '0000-00-00 00:00:00' == $post_date_gmt ) {
2551	                if ( !in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) )
2552	                        $post_date_gmt = get_gmt_from_date($post_date);
2553	                else
2554	                        $post_date_gmt = '0000-00-00 00:00:00';
2555	        }
}}}

which fills post_date_gmt, when not filled.

this block is missing from wp_insert_attachment function and it fills this column with current date time.

wp_list_table shows date from post_date_gmt so it is then confusing.

P.S.: wouldn't be better to have one function (wp_insert_post) and make wp_insert_attachment just somehow extend it for attachments? IMO they are (should be) 99 % same."	enhancement	closed	normal		Upload	3.4.2	normal	duplicate		
