diff options
| author | Tim Graham <timograham@gmail.com> | 2013-12-26 15:50:33 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-12-26 15:50:49 -0500 |
| commit | 62f282a265ae7f8d051f7ce79788cfc1a84d1a24 (patch) | |
| tree | a20465173ab5fe7ef828d2045a28d182648c2514 /docs | |
| parent | 3bb7de8c7c3f9d5de5426d94f45fe83b5d998357 (diff) | |
[1.6.x] Fixed #21629 -- Added instructions for loading MySQL time zone definitions.
Thanks Aymeric for the suggestion.
Backport of d8d83777eb from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/databases.txt | 11 | ||||
| -rw-r--r-- | docs/topics/i18n/timezones.txt | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt index d900ce49df..ef2e1b8583 100644 --- a/docs/ref/databases.txt +++ b/docs/ref/databases.txt @@ -277,6 +277,17 @@ making it impossible to use :class:`django.db.models.BinaryField`. .. _MySQL-for-Python-3: https://github.com/clelland/MySQL-for-Python-3 +.. _mysql-time-zone-definitions: + +Time zone definitions +--------------------- + +If you plan on using Django's :doc:`timezone support </topics/i18n/timezones>`, +use `mysql_tzinfo_to_sql`_ to load time zone tables into the MySQL database. +This needs to be done just once for your MySQL server, not per database. + +.. _mysql_tzinfo_to_sql: http://dev.mysql.com/doc/refman/5.5/en/mysql-tzinfo-to-sql.html + Creating your database ---------------------- diff --git a/docs/topics/i18n/timezones.txt b/docs/topics/i18n/timezones.txt index 5e3a482154..839813a823 100644 --- a/docs/topics/i18n/timezones.txt +++ b/docs/topics/i18n/timezones.txt @@ -649,6 +649,12 @@ Troubleshooting >>> local.date() datetime.date(2012, 3, 3) +4. **I get an error** "``Are time zone definitions for your database and pytz + installed?``" **pytz is installed, so I guess the problem is my database?** + + If you are using MySQL, see the :ref:`mysql-time-zone-definitions` section + of the MySQL notes for instructions on loading time zone definitions. + Usage ----- |
