使用rockMongo时总是遇到如下警告:

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 166

google了一下,找到如下几种解决方法:

一、在页头使用date_default_timezone_set()设置 date_default_timezone_set(‘PRC’);
二、在页头使用ini_set(‘date.timezone’,'Asia/Shanghai’);
三、修改php.ini。打开php5.ini查找date.timezone 去掉前面的分号修改成为:date.timezone =PRC

我是按照第一种方法解决的,修改之后的VarExportor.php文件头部如下:

date_default_timezone_set("PRC"); 
define("MONGO_EXPORT_PHP", "array");
define("MONGO_EXPORT_JSON", "json");

相关文章:

  • 2022-12-23
  • 2021-11-28
  • 2021-05-03
  • 2021-07-09
  • 2021-09-28
  • 2022-01-16
  • 2022-01-17
猜你喜欢
  • 2021-07-09
  • 2021-12-18
  • 2022-12-23
  • 2022-02-09
  • 2021-10-25
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案