It should take them into consideration.
How’d you determine that it doesn’t? Could you show me an example query you’re doing?
Well not really I’m using the plugin save function, and it uses update_post_meta.
But I’m guessing that the if/else check on hours has a typo here; the data type is originally $hours but in the check it’s $hour and the insert also uses $hours.
$date = sanitize_text_field( $_POST['sc_event_date'] );
$hours = sanitize_text_field( absint( $_POST['sc_event_time_hour'] ) );
$minutes = sanitize_text_field( absint( $_POST['sc_event_time_minute'] ) );
$am_pm = sanitize_text_field( $_POST['sc_event_time_am_pm']);
$end_hour = sanitize_text_field( $_POST['sc_event_end_time_hour']);
$end_minutes = sanitize_text_field( $_POST['sc_event_end_time_minute']);
$end_am_pm = sanitize_text_field( $_POST['sc_event_end_time_am_pm']);
$recurring = isset($_POST['sc_event_recurring']) ? $_POST['sc_event_recurring'] : '';
if( $am_pm == 'pm' && <strong>$hour</strong> < 12 )
<strong>$hour</strong> += 12;
elseif( $am_pm == 'am' && $hour >= 12 )
<strong>$hour</strong> -= 12;
$day = date( 'd', strtotime( $date ) );
$month = date( 'm', strtotime( $date ) );
$year = date( 'Y', strtotime( $date ) );
$final_date_time = mktime( $hours, $minutes, 0, $month, $day, $year );
update_post_meta($post_id, 'sc_event_date_time', $final_date_time);
update_post_meta($post_id, 'sc_event_date', strtotime($date));
update_post_meta($post_id, 'sc_event_day', date('D', strtotime($date)));
update_post_meta($post_id, 'sc_event_day_of_month', $day);
update_post_meta($post_id, 'sc_event_month', $month);
update_post_meta($post_id, 'sc_event_year', $year);
update_post_meta($post_id, 'sc_event_time_hour', $hours);
update_post_meta($post_id, 'sc_event_time_minute', $minutes);
update_post_meta($post_id, 'sc_event_time_am_pm', $am_pm);
update_post_meta($post_id, 'sc_event_end_time_hour', $end_hour);
update_post_meta($post_id, 'sc_event_end_time_minute', $end_minutes);
update_post_meta($post_id, 'sc_event_end_time_am_pm', $end_am_pm);
update_post_meta($post_id, 'sc_event_recurring', $recurring);
Sorry about the strong-tags around the $hour var, that didn’t work as intended.