MySQL Time Zone Tables

From MythTV Official Wiki
Revision as of 02:35, 8 June 2012 by Llib (talk | contribs) (0.26 MySQL Requirement, based on -dev and -commit lists info from Mike Dean, tested on ubuntu 12.04)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Starting with MythTV version 0.26, the time zone tables must be loaded in MySQL.

Distributions that don't have the time zone tables loaded (please update or change this list to distributions that do have the tables loaded):

Ubuntu 12.04
Mythbuntu 10.04

To see if the tables are already loaded, enter mysql and type:

SELECT CONVERT_TZ('2012-06-07 12:00:00', 'GMT', 'America/New_York');

If the response looks like:

+--------------------------------------------------------------+
| CONVERT_TZ('2012-06-07 12:00:00', 'GMT', 'America/New_York') |
+--------------------------------------------------------------+
| 2012-06-07 08:00:00                                          |
+--------------------------------------------------------------+

the tables are loaded and no further action is required.


Important.png Note: If the time zone tables are updated, then the procedure below should be repeated.

If the response looks like:

+--------------------------------------------------------------+
| CONVERT_TZ('2012-06-07 12:00:00', 'GMT', 'America/New_York') |
+--------------------------------------------------------------+
| NULL                                                         |
+--------------------------------------------------------------+

then the tables must be loaded.

Assuming the distribution's time zone information is in /usr/share/zoneinfo, type:

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p<yourpassword> mysql

Restart MySQL, and repeat the initial test.

References: