我有一个laravel应用程序,我正在尝试将用户签入和签出保存到我的数据库
我有一个模型Checkins,我记录它像created_at和updated_at
在我的localhost它保存我的timezome(埃及)的正确时间,我试图将app.php文件更改为以下
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
| This is a bad thing really i think there is a problem within the server, the datetime
*/
'timezone' => 'EET',
它在我的本地主机上工作得很好,并保存在当前正确的时间,生产它与UTC时区一起保存
此外,当我在生产终端写入命令日期日期时,我得到以下内容
Tue Mar 31 12:46:38 EET 2015
我检查了mysql的时区,我发现它从系统时间得到的时间
SELECT @@global.time_zone, @@session.time_zone;
SYSTEM
这有什么不对?
更新:
我用日期创建了一个php页面(‘H:i:s’);它打印正确的时间