Think I almost got it, but stuck at one area.
I did the following:
Around line 136 I added the following code to determine the parent post post_date. Unfortunately this line does not yet do the trick and I am not able to get the post_date. When I use some test date it works perfect and the test date appears in the media libary post.
$parentdate = mysql_query("SELECT $wpdb->post_date FROM $wpdb->posts WHERE ID='$p->post_ID'");
Then (around) line 139 I made a change to distribute $parentdate to the media upload function:
$id = ex2gal_media_handle_upload('ex2gal', $p->post_ID, $parentdate, $postdata);
Line 199 included parentdate
function ex2gal_media_handle_upload($file_id, $post_id, $parentdate, $post_data = array()) {
Then I added the following in line 227 to get the parent post date in the media upload.
'post_date' => $parentdate,