php - How to setup timezone xampp mysql and apache? -
i using xampp - php , mysql servers. when tried utilize next - getrates(date('y-m-d')); function getrates($cdate) { $query = "select * randa date '$cdate'" //it worked @ times. } ?>
then realized date('y-m-d') not homecoming right date. went php.ini , changed time zone. , still returning wrong date.
how can prepare ? give thanks
try this
1) in httpd.conf (\xampp\apache\conf\httpd.conf) , add together next line:
setenv tz europe/moscow
2) edit php.ini (\xampp\php\php.ini) date.timezone value in [date] section:
date.timezone = "europe/moscow"
3) in my.ini (\xampp\mysql\bin\my.ini) add together or replace
default-time-zone = "europe/moscow"
restart apache , mysql
php mysql datetime xampp
No comments:
Post a Comment