Add Hidden Field for Timestamp

I am trying to find the php code that I can add to functions.php to pull a date and time stamp of form submission.

The closest I found is the below but I need this to show in date and time format - not UNIX.

add_action( 'gform_pre_submission', 'pre_submission_handler' );
function pre_submission_handler( $form ) {
$_POST['input_7'] = time();
}

Please see the documentation for the gform_field_value filter. Specifically, the two examples here for populating the date and the time:

You will need some combination of those two date formats combined into one function. What “date and time” format are you looking for?

For example:

MM/DD/YYYY HH:MM ? Or something else?

Hoping to have it like this:
MM/DD/YYYY HH:MM:SS

Is this possible? The codes you supplied work for individual Date and Time fields (without the seconds). How can I combine them to one field?

    add_filter( 'gform_field_value_time', 'populate_time' );
function populate_time( $value ) {
    $local_timestamp = GFCommon::get_local_timestamp( time() );
 
    return date_i18n( 'h:i A', $local_timestamp, true );
}

add_filter( 'gform_field_value_current_date', 'populate_current_date' );
function populate_current_date( $value ) {
  $local_timestamp = GFCommon::get_local_timestamp( time() );
 
  return date_i18n( 'm/d/Y', $local_timestamp, true );
}