When creating new posts for a video demonstration, I wanted to display a consistent date. While my first thought was to reset my system clock, this snippet overrides the date when the post is first created, which worked for me.
add_filter( 'wp_insert_post_data', function( $data, $postarr ) {
$data['post_date'] = '2018-05-04 12:00:00';
return $data;
}, 99, 2 );
Leave a Reply