I've noticed that you're using a Cron job plugin to run the shortcode "jsoncontentimporterpro" from the import plugin, to periodically run the import.
You can execute another custom shortcode, which should be executed after every import, that can cycle through all the published posts in the target post type, gets the value of the target custom field, and convert it to the 12:00am (UTC) equivalent value.
For example:
add_shortcode('convert_date_fields', 'convert_date_fields_func');
function convert_date_fields_func($atts) {
// extract shortcode attributes
extract( shortcode_atts( array(
'post_type' => '',
'field_slug' => '',
), $atts ) );
// get all the pulished posts from the target post type
$args = array(
'post_type' => $post_type,
'posts_per_page' => -1,
'post_status' => 'publish',
);
$posts_array = get_posts( $args );
// cycle through all found posts
foreach ($posts_array as $post) {
// get the value from the target custom field
$post_field_value = get_post_meta($post->ID, $field_slug, true);
// if the value is not empty
if(!empty($post_field_value)) {
// convert the date value to the midnight time
$post_field_value_midnight = date('F j, Y g:i a', strtotime('today', $post_field_value));
// convert the new midnight time to Unix timestamp
$post_field_value_U = date_format(date_create($post_field_value_midnight),"U");
// update this new Unix timestamp value into the target custom field
update_post_meta( $post->ID, $field_slug, $post_field_value_U, $post_field_value );
}
}
}
The above code snippet can be included through either Toolset's custom code feature ( ref: https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/ ) or through active theme's "functions.php" file.
This shortcode will need two attributes:
post_type: slug of the target post type
field_slug: slug/key of the target custom field
For example to cycle through all Posts and update the value of the custom field "wpcf-post-date", the shortcode would be:
[convert_date_fields post_type='post' field_slug='wpcf-post-date']
Note: The custom code examples from our forum are shared to get you started in the right direction. You're welcome to adjust them as needed and for more personalized customization assistance, you can consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/