1

I'm trying to set the timezone the database uses using:

"SET time_zone = 'UTC';

Whilst this works on my development server it doesn't work on my staging server; I get this error:

General error: 1298 Unknown or incorrect time zone: 'UTC'

Now I am assuming this is because I cannot see a mysql table on the staging server with the respective timezones, whilst it does exist on my development server.

Edit: Apparently it does exist on the staging server but the user I am logged in with for that database can't see it, so I guess MySQL can't find the data.

I'm building some software that others will be using on their servers, so I will have no idea if they will have the aforementioned mysql table.

With that said, should I avoid using "SET time_zone = 'UTC'; in software that others will use?

If so, what is the correct way to handle this situation?

Is doing something like:

"SET time_zone = '+0:00';

...the better way to do it?

  • Submit a bug at bugs.mysql.com . – Rick James Aug 31 '15 at 19:11
  • @RickJames What bug? – Brett Sep 1 '15 at 9:52
  • That it won't take 'UTC'. But first, check that you have installed TimeZone Support. – Rick James Sep 1 '15 at 14:45
  • @RickJames Check the edit I made earlier. :) – Brett Sep 2 '15 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.