5


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

1 Answer 1

8

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',
2
  • I did what you told and even add the same timezone in php.ini and restarted I am getting this error Notice: date_default_timezone_set(): Timezone ID '' is invalid in D:\vendor\compiled.php on line 1808 Fatal error: Call to undefined method Illuminate\Foundation\Bootstrap\ConfigureLogging::configureHandler() in D:\vendor\compiled.php on line 1673 Commented Mar 27, 2015 at 12:41
  • 1
    'timezone' => env('APP_TIMEZONE', 'Asia/Kolkata'), Commented Mar 27, 2015 at 12:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.