Search code examples
phplaravellaravel-5

Laravel changing timezone not reflecting the correct time


I am changing the timezone into Asia/Singapore at config/app.php, but when I try to do a date("Y-m-d H:i:s"); the result is still in UTC.

Is there anything in Laravel that overrides that timezone that I set at config/app.php ?


Solution

  • Just do this:

    'timezone' => 'Asia/Singapore'

    in config/app.php file and run this 3 command:

    php artisan cache:clear

    php artisan view:clear and

    php artisan config:cache

    Hope this helps you!!