on-internet
← Community

Laravel 5.8 - Timezone environment variable

Stack Overflow ·

I have a problem where I can't seem to make Laravel pick up the system wide APP_TIMEZONE env variable, I am not sure if using php-fpm affects that. When I add it to the .env the DateTime are correctly set using the timezone When I remove it, DateTime now uses UTC from Laravel app.php default ('timezone' => env('APP_TIMEZONE', 'UTC')) When I remove it, add APP_TIMEZONE to /etc/environment, reboot, printenv returns the right variable so does Tinker (but I think it's using the CLI and not the FPM process) and instantiating a date in Tinker shows the correct timezone, however running my app show d

Comments

Sign in or sign up to comment and upvote.

No comments yet.