String has a time zone, and there is usually no need to set a default time zone. But when it needs to be printed, the default time zone can be set explicitly. Below is the code to do the same −
echo date_default_timezone_get();
This will produce the following output −
UTC
When timezone is specified
echo date("Y-m-d H:i:s",strtotime("1/1/2020 00:00:00 America/Los_Angeles"));
This will produce the following output −
2020-01-01 08:00:00
echo date("Y-m-d H:i:s",strtotime("1/1/2020 00:00:00"));
This will produce the following output −
2020-01-01 00:00:00