Hi,
I tried again to disable all the plugins that could cause some conflict, but the problem persists – but maybe I overlooked something. So I added this action to my child’s theme to make sure the date is written down to db and everything works fine now:
add_action(‘save_post’, ‘change_date’);
function change_date($post_id) {
global $wpdb;
$mm = $_POST[‘mmm’];
$jj = $_POST[‘jjm’];
$aa = $_POST[‘aam’];
$hh = $_POST[‘hhm’];
$mn = $_POST[‘mnm’];
$ss = $_POST[‘ssm’];
$newdate = sprintf(“%04d-%02d-%02d %02d:%02d:%02d”, $aa, $mm, $jj, $hh, $mn, $ss);
if ( !empty( $mm ) ) {
$post_modified= $newdate;
$post_modified_gmt = get_gmt_from_date( $newdate );
$wpdb->query(“UPDATE $wpdb->posts SET post_modified = ‘{$post_modified}’, post_modified_gmt = ‘{$post_modified_gmt}’ WHERE ID = {$post_id}” ); }