开发者

Change MySQL Timezone on shared server

开发者 https://www.devze.com 2023-03-21 09:42 出处:网络
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.

I'm on a shared server and want to change the MySQL time zone.

I added SetEnv 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

0

精彩评论

暂无评论...
验证码 换一张
取 消