I’m facing a small issue with time zones in my Laravel application and would appreciate your help. I have a scheduled job in Laravel that updates event statuses. The job logs show the following timestamps in the laravel.log file:
[2024-08-19 09:58:18] local.INFO: Success: Checked at 2024-08-19 09:58:18
[2024-08-19 09:58:18] local.INFO: Number of events updated to 'En cours': 0
[2024-08-19 09:58:18] local.INFO: Number of events updated to 'Terminé': 4
However, the actual local time is 10:58, not 09:58. I’ve checked the following:
Server Time Zone:
The server time zone is set correctly.
Laravel Configuration:
In config/app.php, I have:
php
Copy code
‘timezone’ => ‘UTC’,
I need the log times to reflect my local time zone (e.g., Central European Time). What should I change in my Laravel configuration or code to ensure that the job logs show the correct local time?
Thank you for your assistance!
I want the job logs to reflect the local time zone (e.g., Central Africa Time) instead of UTC. How can I configure Laravel or the server to ensure that the job logs display the correct local time?
Thank you for your assistance!