title: MySQL CONVERT_TZ()
body: <p>I am trying to set up a database that stores daily alert times as specified by users.  For example, the user wants to receive an alert if some criterion is met each day between 7:00 AM and 7:30 AM.  In trying to implement this, I need to accommodate daylight saving time.  Here's my attempted solution:</p>
  
  <ol>
  <li>Store the users local time zone (in long form, e.g. "US/Eastern") information in one table (say userInfo), and the alarm times in another table (say userAlarms).</li>
  <li>When querying the userAlarms table, convert UTC time into the users local time as specified by the tz column stored in the userInfo table via <code>CONVERT_TZ(UTC_TIME(), 'UTC', userInfo.tz)</code>.</li>
  </ol>
  
  <p>Question 1.  From my understanding, specifying the time zone name (like US/Eastern) <em>should</em> take daylight saving time into account.  For example, calling <code>CONVERT_TZ('00:00:00', 'UTC', 'US/EASTERN')</code> on January 1 should yield '19:00:00', but on July 1 the call should yield '20:00:00'.  Am I correct?</p>
  
  <p>Question 2.  If Q1 is correct, do I need to constantly update MySQL's time zone table to keep the time zone UTC offsets up to date?</p>
  
  <p>Question 3.   The sample given in the MySQL documentation <code>SELECT CONVERT_TZ('2004-01-01 12:00:00','GMT','MET')</code> yields "<code>NULL</code>" when run on my server.  Could this be caused by not having the time zone tables set-up?  </p>
  
  <p>How can I check this?</p>