ginatrapani/ThinkUp — pull request #1073 by cwarden (2011-10-28 20:58:13+00:00)
Title: Use timezone instead of UTC offset if possible

Set the time_zone session variable in MySQL to a timezone, e.g.
America/Los_Angeles, instead of the current offset. This fixes
conversion from/to UTC for times that are in a different offset.

For example, on 2011-10-28, Los Angeles is -07:00 because it is daylight
saving time. If you store 2011-01-01 00:00:00 into a TIMESTAMP field
when your time_zone session variable is set to '-07:00', the time will
be stored as 2011-01-01 07:00:00 UTC instead of 2011-01-01 08:00:00,
which will be used if your time_zone variable is set to
'America/Los_Angeles'.

Using timezones instead of offsets requires that the MySQL timezone
tables be populated. See mysql_tzinfo_to_sql(1). If a timezone can't
be used, fall back to using an offset.