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

时间:2013-07-11 09:34:15

标签: php mysql database timestamp

在我的数据库中,registration_time设置为current_timestamp。但它提前7个小时。我该如何纠正?

1 个答案:

答案 0 :(得分:0)

你实际的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;

您也可以在此link

找到有关时区设置的详细信息