cPanel & WHM Version 80 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!
 

Insert zoneinfo into MySQL on install

Tudor Holton shared this idea 3 years ago
Open Discussion

I just ran into an interesting problem on a new CPanel server.


  1. CONVERT_TZ(NOW(),'UTC',$timezone)

returns NULL.


This is a small "feature" in MySQL as described here: http://dev.mysql.com/doc/refman/5.7/en/mysql-tzinfo-to-sql.html.


By default MySQL's timezone data is blank on new installs. To get the zoneinfo into MySQL, we have to run:

  1. mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql

or

  1. mysql_tzinfo_to_sql --leap /usr/share/zoneinfo | mysql -u root mysql (to include leap second information)


Can we please include this as part of the installation?