title: Switching INSERT to REPLACE makes DATE_SUB() result invalid
body: <p>I have the following query working fine ignoring on unique key:</p>
  
  <pre><code>insert_post = ("""INSERT IGNORE INTO posts 
                  SET internal = %s,
                      schedule_date = DATE_SUB(%s, INTERVAL 2 HOUR)
                 """)
  </code></pre>
  
  <p>As soon as I switch the query to <code>REPLACE</code> or <code>ON DUPLICATE KEY UPDATE</code> I get the following error:</p>
  
  <pre><code>mysql.connector.errors.DataError: 1292 (22007): Truncated incorrect datetime value: '2017-08-19T12:45:00-0500'
  </code></pre>
  
  <p>I under stand that the incoming value format is not compatible with MySQL datetime column, but it doesn't seem to be an issue on my initial <code>INSERT</code>. </p>
  
  <p>Any ideas on what I'm missing?</p>
  
  <p>Here's an SQL fiddle, but the panel won't run the DDL/DML so don't expect much more than a schema: <a href="http://sqlfiddle.com/#!9/656a3/2" rel="nofollow noreferrer">http://sqlfiddle.com/#!9/656a3/2</a></p>
  
  <p>Edit: Here's the working SQLfiddle showing the replicated error: <a href="http://sqlfiddle.com/#!9/c13f45/1" rel="nofollow noreferrer">http://sqlfiddle.com/#!9/c13f45/1</a></p>