php 埃及时区,laravel – Created_at以错误的时区保存

我有一个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’);它打印正确的时间

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值