I'm on a shared server and want to change the MySQL time zone.
I addedSetEnv TZ Asi开发者_JAVA技巧a/Calcutta
in .htaccess
and it just changed PHP's time settings.
Is there any way to change the MySQL timezone setting from htaccess or PHP.INI ?No. MySQL settings cannot be controlled from Apache. You must edit the my.cnf file.
Perhaps it is possible to alter the session timezone from your scripts, by executing SET SESSION time_zone = YOURTZ;
Take a look at the documentation http://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html
精彩评论