Home > database >  Virtual host use now () get slower than real time 6 hours, I want to do?
Virtual host use now () get slower than real time 6 hours, I want to do?

Time:10-09

Host is to buy foreign server, own written procedures,
In PHP insertion time, directly use now (), found that the time is wrong, baidu online found that most of the answers are command set, I buy a server has no such function, method is invalid, I then used two other methods, but not all,
1, the set the.htaccess file, invalid , add php_value date. The timezone 'Asia/Shanghai'
2, download database, modify the SQL file, invalid , SET time_zone="Asia/Shanghai"; And SET time_zone="+ 6";

PHP application is to set the time zone of the
If (function_exists (' date_default_timezone_set))
{
@ date_default_timezone_set (" PRC ");
}

Now I want to how to solve?

Ask server technology, also can't answer,

CodePudding user response:

From the set global time_zone="+"

CodePudding user response:

Provide ideas
1. After modify the corresponding configuration, restart the corresponding service?
2. Mysql server default is to read the time zone of the operating system, if, after the modification of the operating system time is the need to restart the Mysql service, to work
  • Related