1

I am trying to install Symfony on an Ubuntu system with:

symfony new my_project

But it shows the error:

date.timezone setting must be set Set the "date.timezone" setting in php.ini* (like Europe/Paris).

But I already set it:

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone=Asia/Kolkata

I further added the following code to AppKernel.php:

public function init()
{
    // get rid of Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone
    date_default_timezone_set( 'Asia/Kolkata' );
    parent::init();
}

Still it is giving the same error. What am I missing?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.