Code:
date_default_timezone_set('UTC'); echo date("mdY"); echo "<br>"; echo strtotime("now"); echo "<br>"; echo date("mdY",strtotime("now")); Why is the date wrong? php says 23 number, but in fact 24.
"; echo strtotime("now"); echo "
"; ech...">
Code:
date_default_timezone_set('UTC'); echo date("mdY"); echo "<br>"; echo strtotime("now"); echo "<br>"; echo date("mdY",strtotime("now")); Why is the date wrong? php says 23 number, but in fact 24.
Check out date_default_timezone_set () , as you wrote above.
If you do not specify a time zone, it is determined by the default settings in php.ini settings
Source: https://ru.stackoverflow.com/questions/859398/
All Articles
date_default_timezone_set('Europe/Moscow');- ManitikylDateTimephp.net/manual/ru/class.datetime.php - Manitikyl