ziutek/mymysql — pull request #80 by seehuhn (2013-08-27 18:42:40+00:00)
Title: Add optional time zone information for DATETIME database colums.

MySQL DATETIME columns store times without information about the time zone the time should be interpreted in. This commit adds the posibility to specify which time zone is used for columns accessed via a mymysql database connection. If a timezone is specified, times are converted to the correct time zone before being sent to the database, and are interpreted as being in this time zone when returned from the database. If no time zone is set, all times are assumed to be in the current local time zone.

There are two methods for specifying the time zone. The new global variable mysql.DefaultTimeZone can be set to set the timezone for all database connections opened afterwards. A per-connection time zone can be chosen by setting the new native.Conn.TimeZone field.