I'm trying to set the timezone configuration on config/app.php
base on my the system time on CentOS VM automatically.
'timezone' => 'America/New_York',
I've tried added these few lines of code on top of config/app.php
// Try #1
// $timeZone = shell_exec("date +\"%Z %z\" | awk '{print $1}'");
// dd($timeZone); I got "EST\n"
// Try #2
// session_start();
// $timezone = $_SESSION['time'];
// dd($timeZone);
// Try #3
// $timezone = date_default_timezone_get()
// dd($timeZone);
None of these above seem to work.
How would one go about debugging this further?