rockMongo时区警告的解决
生活随笔
收集整理的這篇文章主要介紹了
rockMongo时区警告的解决
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
使用rockMongo時(shí)總是遇到如下警告:
Warning: date_default_timezone_get(): 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 'UTC' for '8.0/no DST' instead in C:\mongo\rockmongo\web\rockmongo\app\classes\VarExportor.php on line 166google了一下,找到如下幾種解決方法:
一、在頁頭使用date_default_timezone_set()設(shè)置 date_default_timezone_set(‘PRC’);
二、在頁頭使用ini_set(‘date.timezone’,'Asia/Shanghai’);
三、修改php.ini。打開php5.ini查找date.timezone 去掉前面的分號(hào)修改成為:date.timezone =PRC
我是按照第一種方法解決的,修改之后的VarExportor.php文件頭部如下:
date_default_timezone_set("PRC");?define("MONGO_EXPORT_PHP", "array");
define("MONGO_EXPORT_JSON", "json");
總結(jié)
以上是生活随笔為你收集整理的rockMongo时区警告的解决的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 开源实体映射框架EmitMapper介绍
- 下一篇: UPS计算