Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to update my timezone database, on CentOS, the database located at /usr/share/zoneinfo.

I downloaded the time zone data from IANA here: http://www.iana.org/time-zones

I tried editing the 'make' file and executing that, but got several errors so I'm not sure that was the right thing to do. I also tried just replacing my zoneinfo folder with this new data, and got the error that my timezone database was corrupt.

Am I missing something obvious, or am I missing instructions somewhere on how to do this? Would someone tell me how to install this?

(I'm trying to do this because mysql is giving me errors like this: 'error: SET time_zone = 'US/Pacific' Unknown or incorrect time zone: 'US/Pacific').

Thank you! :)

share|improve this question

1 Answer 1

Don't update the zoneinfo database manually. Just install the updates which are already provided for you by EL/CentOS in the tzdata package:

# yum update tzdata

Also note that MySQL keeps its own internal time zone tables, separate from the system timezone database. To update MySQL's internal time zone tables, run the mysql_tzinfo_to_sql script which came with MySQL.

share|improve this answer
    
Thanks Michael! :) After doing that, and restarting mysql, restarting nginx, I'm still getting mysql errors - mysql doesn't know the time zones I'm using (things like, US/Hawaii, US/Alaska, US/Pacific). These are all listed in the list of tz database time zones here on Wikipedia: en.wikipedia.org/wiki/List_of_tz_database_time_zones - what could be wrong? –  user2044774 May 30 '13 at 0:34
    
Oops, forgot that detail. I've updated the answer. –  Michael Hampton May 30 '13 at 0:40
    
YAY that did it! Thank you!! :D –  user2044774 May 30 '13 at 2:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.