gpt4 book ai didi

php - Laravel 日期默认错误

转载 作者:行者123 更新时间:2023-12-01 00:54:09 24 4
gpt4 key购买 nike

当我总是安装 laravel v5 并在完成安装后,当我查看新安装时出现错误

Warning: date_default_timezone_set(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in D:\vendor\compiled.php on line 1808

Notice: date_default_timezone_set(): Timezone ID '' is invalid in D:\vendor\compiled.php on line 1808

Warning: Illuminate\Foundation\Bootstrap\ConfigureLogging::configureHandlers(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in D:\vendor\compiled.php on line 1673

Fatal error: Call to undefined method Illuminate\Foundation\Bootstrap\ConfigureLogging::configureHandler() in D:\vendor\compiled.php on line 1673



但是对于 v4.2.0 一切正常并且可以正常工作我想使用 v5 所以请告诉我。

提前致谢

最佳答案

我们可以在 中设置时区配置文件 app/config/app.php或任何 app/config/environment/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.
|
*/

// Default value of timezone is 'UTC', I have changed it to 'Asia/Kolkata'

'timezone' => 'Asia/Kolkata',

关于php - Laravel 日期默认错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29298766/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com