php - 未捕获的异常 'Fuel\Core\PhpErrorException' ....系统的时区设置
问题描述
我使用 Php 5.3,从 UTC 更改为 EDT/-4.0/DST 时区时会出现以下错误。请帮帮我...谢谢。我将在时区更改错误之前和之后进行描述...
时区更改之前:
Fuel\Core\PhpErrorException [错误]: date_default_timezone_get() [function.date-default-timezone-get]: 依赖系统的时区设置是不安全的。您需要使用 date.timezone 设置或 date_default_timezone_set() 函数。如果您使用了这些方法中的任何一种,但仍然收到此警告,您很可能拼错了时区标识符。我们为“EDT/-4.0/DST”选择了“America/New_York”
COREPATH/classes/fuel.php @ line 161
156 date_default_timezone_set(static::$timezone);
157 }
158 catch (\Exception $e)
159 {
160 date_default_timezone_set('UTC');
161 throw new \PHPErrorException($e->getMessage());
162 }
163
164 static::$encoding = \Config::get('encoding', static::$encoding);
165 MBSTRING and mb_internal_encoding(static::$encoding);
<br />
时区更改为“EDT/-4.0/DST”后
致命错误:未捕获的异常 'Fuel\Core\PhpErrorException' 并带有消息'未知:依赖系统的时区设置是不安全的。您需要使用 date.timezone 设置或 date_default_timezone_set() 函数。如果您使用了这些方法中的任何一种,但仍然收到此警告,您很可能拼错了时区标识符。我们在 Unknown:0 Stack trace: #0 /home/files/website/bus/fuel/core/bootstrap.php(98): Fuel\Core 中为 'EDT/-4.0/DST' 选择了 'America/New_York' \Error::error_handler(2, 'Unknown: It is ...', 'Unknown', 0) #1 [内部函数]: {closure}(2, 'Unknown: It is ...', 'Unknown' , 0, 数组) #2 {main}
在第0行引发未知警告:文件(未知)[function.file]:无法打开流:第325行的/home/files/website/bus/fuel/core/classes/debug.php中没有此类文件或目录警告:array_unshift() 期望参数 1 是数组,布尔值在第326行的/home/files/website/bus/fuel/core/classes/debug.php中给出警告:array_slice() 期望参数 1 是数组,布尔值给定在第341行的/home/files/website/bus/fuel/core/classes/debug.php
回溯 COREPATH/bootstrap.php @ 第 66 行
61 \Cli::error("Error: ".$e->getMessage()." in ".$e->getFile()." on ".$e->getLine());
62 \Cli::beep();
63 exit(1);
64 }
65 }
66 return \Error::shutdown_handler();
67});
68
69set_exception_handler(function (\Exception $e)
70{
71 // reset the autoloader
解决方案
推荐阅读
- java - 如何逆时针旋转一圈画布android
- javascript - 如何将猫鼬承诺循环限制为几次?
- javascript - 如何解决错误“THREE.GLTFLoader:加载缓冲区“scene.bin”失败。”?
- java - JavaFX 应用程序线程 - 使用 Gluon Ignite 依赖注入时
- node.js - 无法使用 Sequelize 从 PG DB(在 Azure 中)检索数据
- java - 键盘输入的最高性能
- c - 如何正确返回结构数组(在此代码战示例中)?
- wpf - 如何识别标签是否添加到像素感?
- database - 数据冗余和数据不一致的区别
- amazon-web-services - 如何使用 S3 在 aws 中设置静态站点 - 是否有视觉指南?