在我的数据库中,registration_time设置为current_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;
此外,您还可以在这个链接中找到有关时区设置的详细信息