简体   繁体   中英

Windows Server 2012 IIS PHP Unable to set timezone through php.ini

My windows server 2012 system timezone is set as UTC8 Kuala Lumpur/Singapore.

I found that PHP time differs from system time, it returns a UTC time. Then i try to set the timezone at php.ini where i set it as

date.timezone = "Asia/Singapore"

I restarted the server after changing the PHP ini and it still returns UTC time. phpinfo() shown these values

date

date/time support   enabled
"Olson" Timezone Database Version   2013.2
Timezone Database   internal
Default timezone    Europe/Dublin

Directive   Local Value Master Value
date.default_latitude   31.7667 31.7667
date.default_longitude  35.2333 35.2333
date.sunrise_zenith 90.583333   90.583333
date.sunset_zenith  90.583333   90.583333
date.timezone   Europe/Dublin   Europe/Dublin

How do i fix this?

check if there is date.timezone under [WebPIChanges] and change it to Asia/Singapore . I solved My issue by this way. Hope this will help you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM