title: wordpress change last modified date of the post to post date (scheduled post)
body: <p>I have an idea to change the value of <code>post_modified</code>, so the value will have the same value with the <code>post_date</code>.</p>
  
  <p>But Wordpress has a revision system, so I want to change the <code>post_modified</code> on the revision to have a same value with <code>post_date</code>.</p>
  
  <p>Here is my query to change it:</p>
  
  <pre><code>$query = "UPDATE $wpdb-&gt;posts 
            SET 
                post_modified = '$recent-&gt;post_date',
                post_modified_gmt = '$recent-&gt;post_date_gmt'
            WHERE 
                ID = '$update-&gt;ID'";
  
  $wpdb-&gt;query($query);
  
  
  $recent-&gt;post_date is the post_date (scheduled time / time where our post will appear in the website)
  
  $recent-&gt;post_date_gmt is post_date_gmt
  </code></pre>
  
  <p><code>$update-&gt;ID</code> is the revision ID in posts table.</p>
  
  <p>But when I run the query, it doesn't change the value and stops my plugin.</p>
  
  <p>Is there something I missed? Or is it that Wordpress itself doesn't allow us to change the <code>post_modified</code>?</p>