MYSQL Timezone support

MySQLtimezone

We are having a shared hosting plan and they are saying that do provide MYSQL Timezone support in a shared hosting plan. I can create timezone related tables in our database and populate them with required data(data from from our local MYSQL Timezone related tables. How to view the code syntax for MySQL "CONVERT_TZ" function?

Thanks
Arun

Best Answer

In order to timezone support to be around, the hosting company should have executed this:

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql ...

The mysql_tzinfo_to_sql utility should load the time zones. Please make sure the host company has done this. If they can't or won't,

  • you could into Amazon EC2, you could have full access to MySQL and can run it yourself
  • Find a willing hosting company

BTW Here is the MySQL Documentation for CONVERT_TZ : http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_convert-tz