Automatically Updating Publish Date Bug

You could also hook into the save_{$post_type} action, which fires only when a certain post type is updated. This hook passes to post’s ID to the callback function:

add_action( 'save_post', 'my_callback_function' );
function my_callback_function( $post_id ){

    if ( ! wp_is_post_revision( $post_id ) ){

        // Unhook this function so it doesn't loop infinitely
        remove_action('save_post', 'my_callback_function');

        // Update post's data
          $post = array(
              'ID'              => $post_id,
              'post_date'       => current_time( 'mysql' ),
              'post_date_gmt'   => current_time( 'mysql', 1 ),
          );

        // Update the post, which calls save_post again
        wp_update_post( $post );

        // Re-hook this function
        add_action('save_post', 'my_callback_function');
    }

}