I can not change the time zone in the index.php file
In this file I have all the functions, checks, SQL requests.
I’m setting the team up
date_default_timezone_set (‘Europe / Samara’);
$ date = date (“Y-m-d G: i: s”);
and I write the query:
and I have server time displayed, -4 hours for me. If I register NOW () -> ‘$ date’ together, then the date is displayed in the database as 0000-00-00 00:00:00. I can not understand why this is so? In separate files such as chat and registration, the function $ date is also registered and in the SQL query it is ‘$ date’ instead of NOW () and everything displays correctly. Why does index.php not work?