Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

laravel date default error


When I always install laravel v5 and after completing it's install when i view to the new installation the errors come out

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

But everything fine for v4.2.0 and it working i want to use v5 so please tell me.
Thanks In advance

like image 345
Ravindra Barthwal Avatar asked Mar 27 '15 10:03

Ravindra Barthwal


1 Answers

We can set timezone in config file app/config/app.php or any app/config/environment/app.php at below section.

 /*
|--------------------------------------------------------------------------
| 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',
like image 60
Abdulla Nilam Avatar answered Oct 13 '22 22:10

Abdulla Nilam