草庐IT

expiration_datetime

全部标签

php - joomla 安装新语言 DateTime::__construct(): 解析时间字符串失败 (jerror)

我是全新安装的Joomla3.1,在我的家用电脑上运行。我的环境是带有apache服务器的Ubuntu12.10,安装了php5.4.6。自安装系统以来,不,我只是尝试通过语言管理器安装更多语言:如您所见,我想要的另外2种语言显示在列表中,但在选择每种语言并单击“安装”后,我被引导到一个包含以下消息的页面:DateTime::__construct():Failedtoparsetimestring(jerror)atposition0(j):Thetimezonecouldnotbefoundinthedatabase只需一个按钮即可返回到控制面板。看到这些语言出现在列表中,我感到很

php - Laravel 5.5 登录和注册页面显示 :The page has expired due to inactivity. [TokenMismatchException]

我刚刚使用laravel安装程序创建了一个laravel版本5.5的新项目。并运行命令“phpartisanmake:auth”。View和Controller是为用户身份验证生成的。还有运行“phpartisanmigrate”以在数据库中创建所需的表。当访问登录页面和注册页面时,填写表单并提交。它显示“由于不活动,页面已过期。请刷新并再试一次。”。但是刷新页面没有任何帮助。看源码,哪里会导致异常:if($einstanceofModelNotFoundException){$e=newNotFoundHttpException($e->getMessage(),$e);}elsei

php DateTime createFromFormat 功能

您好,我似乎无法让日期时间方法按预期工作?我可能做错了什么?//PassesOK$dateTime=DateTime::createFromFormat('d/m/Y','12/12/2012');var_dump($dateTime);//shouldfailbutreturns-2016-09-25$dateTime=DateTime::createFromFormat('d/m/Y','56/56/2012');var_dump($dateTime);//correctlyreturnsFalse$dateTime=DateTime::createFromFormat('d/m/

php - IntlDateFormatter::format():datefmt_format:采用数组或整数时间戳值或 DateTime 对象 (SonataSanBox)

关闭。这个问题需要debuggingdetails.它目前不接受答案。编辑问题以包含desiredbehavior,aspecificproblemorerror,andtheshortestcodenecessarytoreproducetheproblem.这将有助于其他人回答问题。关闭7年前。Improvethisquestion我已经安装了SonataAdminBundle。一切正常,但是当我从仪表板添加任何用户时,它会发出警告:Warning:IntlDateFormatter::format():datefmt_format:takeseitheranarrayoranin

PHP:比较两个具有不同时区的 DateTime 对象

PHP如何比较DateTime使用条件运算符时的对象(、>、>=、)?这个比较时区不变吗?我试过下面的代码,看起来它是时区不变的,有人可以确认吗?代码:$datestr="2015-10-0910:28:01";$dt=newDateTime($datestr);$nowdate=newDateTime("now",newDateTimeZone("CET"));print_r($dt);echo"";print_r($nowdate);echo"";var_dump($nowdate输出:DateTimeObject([date]=>2015-10-0910:28:01[timezo

php - 密集的 PHP 脚本失败 w/"The timeout specified has expired"错误/ap_content_length_filter

运行失败的MySQL密集型PHP脚本。Apache日志报告如下:[WedJan1300:20:102010][error][clientxxx.xx.xxx.xxxx](70007)Thetimeoutspecifiedhasexpired:ap_content_length_filter:apr_bucket_read()failed,referer:http://domain.com/script.php尝试将set_time_limit(0)放在顶部。还尝试了set_time_limit(0)都没有修复超时。我可以在http.conf(或其他地方)中设置一些特定的超时限制来防止这

php - 如何使用 DateTime 在 PHP 中获取后天?

我有一个Eloquent查询,目前看起来像这样:$rides=Ride::where('date','>=',new\DateTime('today'))->where('date','get();效果很好,我的问题是,我该如何格式化它:$rides=Ride::where('date','>=',new\DateTime('tomorrow'))->where('date','get();这意味着我正在尝试查找日期介于明天和后天之间的结果。任何帮助将不胜感激。 最佳答案 如果你想得到后天可以使用:new\DateTime('tom

php - 使 DateTime::createFromFormat() 返回子类而不是父类

我正在扩展DateTime,添加一些有用的方法和常量。当使用new创建一个新对象时,一切都很好,但是当使用静态方法createFromFormat时,它总是返回原始的DateTime对象并且当然没有任何子方法可用。我正在使用以下代码来规避此问题。这是最好的方法吗?namespaceNoiseLabs\DateTime;classDateTimeextends\DateTime{staticpublicfunctioncreateFromFormat($format,$time){$ext_dt=newself();$ext_dt->setTimestamp(parent::create

PHP DateTime::Diff 弄错了吗?

DateTime::Diff应计算适当的时间间隔并考虑夏令时(DST)和闰年。虽然显然不是这样。恐怖代码:$d1=newDateTime("2011-10-3001:05:00",newDateTimeZone("Europe/Stockholm"));$d2=newDateTime("2011-10-3003:05:00",newDateTimeZone("Europe/Stockholm"));echo$d1->getOffset()/(60*60);打印“2”!因此请记住,前一天的UTC时间=1h-2h=23:05:00。echo$d2->getOffset()/(60*60);

php - 如何从 symfony2/php 中的字符串创建 DateTime 对象

在数据库表中,我有几个字段类型为datetime的字段。所以我只需要将数据保存为日期时间对象。从表单中我得到日期时间作为字符串2012-10-0517:45:54现在,每当我坚持我的实体时,我都会收到以下错误:Fatalerror:Calltoamemberfunctionformat()onanon-objectin..\DateTimeType.phponline44我试过$protocol->setStartedAt(strtotime($post['started_at']));或$from=\DateTime::createFromFormat('yy-mm-ddhh:mm: