title: How do I store an UTC ISO8601 date in a MySQL database?
body: <p>I have thousands of dates in the following format:</p>
  
  <p><code>2011-10-02T23:25:42Z</code> (aka ISO 8601 in UTC)</p>
  
  <p>What MySQL data type should I use for storing such a ISO8601 date in a MySQL database? E.g. <code>Datetime</code>, <code>timestamp</code> or something else? </p>
  
  <p>Which is best for comparison (eg. getting records between two dates/times) and ordering the results from queries? What about if the database is very large? </p>
  
  <p>And what would be the best way to convert the above PHP string for MySQL storage? (I'm guessing <code>date_default_timezone_set('UTC');</code> would be used?)</p>