使用memcache.php監(jiān)控memcache后,在頁面報時間格式的錯誤:
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in/usr/local/nginx/html/memcache.phpon line 736
根據(jù)提示可以列出memecache.php相關(guān)的行數(shù)內(nèi)容;
24 define('DATE_FORMAT','Y/m/d H:i:s');736 echo '解決辦法:
24 define('DATE_FORMAT','Y/m/d H:i:s');之上增加一行
date_default_timezone_set("PRC");
其他方法,例如在php.ini中設(shè)置date.timezone的值,無論怎么設(shè)置和重啟PHP-FPM進程都不生效,這點比較奇怪;
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機、免備案服務(wù)器”等云主機租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。