DBAtlas · Database operations atlas

1298: Unknown or incorrect time zone

MySQL

What does it mean?

The specified time zone name was not recognized by MySQL. A CONVERT_TZ() call, the time_zone setting or an operation referring to a named time zone (e.g. 'Europe/Istanbul') failed because that time zone is not defined on the server.

Why does it happen?

For MySQL to use named time zones, the time zone tables in the mysql schema (time_zone, time_zone_name, etc.) must be loaded. If these tables are empty, only numeric offsets ('+03:00') work; named zones are unknown and this error is raised.

How to fix it

Load the time zone tables. On Linux, import the system zoneinfo data with mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql; then restart the server or run FLUSH TABLES. If loading named zones is not possible, use a numeric offset ('+03:00'). Verify the spelling of the name (case, 'Europe/Istanbul').

Open in DBAtlas →

More from this engine