在PHP中,current_timestamp给出了与now()不同的时间?

在PHP中,current_timestamp给出了与now()不同的时间?,php,mysql,database,timestamp,Php,Mysql,Database,Timestamp,在我的数据库中,注册时间设置为current\u timestamp。但现在早了7个小时。我怎样才能纠正它 您的实际mysql时间与您的php时间不同 查证 The current values of the global and client-specific time zones can be retrieved like this: mysql> SELECT @@global.time_zone, @@session.time_zone; 要为当前会话设置它,请执行以下操作:

在我的数据库中,注册时间设置为
current\u timestamp
。但现在早了7个小时。我怎样才能纠正它

您的实际mysql时间与您的php时间不同

查证

The current values of the global and client-specific time zones can be retrieved like this: 
mysql> SELECT @@global.time_zone, @@session.time_zone;
要为当前会话设置它,请执行以下操作:

SET time_zone = timezonename;

您还可以在此找到有关时区设置的详细信息

您是否检查了服务器上的时间设置?