DateTime从如何使RFC 3339 [英] DateTime from how make a RFC 3339
本文介绍了DateTime从如何使RFC 3339的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的输入日期为
2014-03-10 05:40:00
,并将其转换为RFC格式,例如 2014-3-10T05:40:00.000-00:00
如何隐藏更多信息需要我提供但我想要解决方案。
My input date is
2014-03-10 05:40:00
and convert it to RFC format like 2014-3-10T05:40:00.000-00:00
how to covert if more information needed I provide but I want solution.
推荐答案
这里另一个选项在php5中添加像这样
here another option added in php5 like this
$datetime= date("c", strtotime("2014-03-10 05:40:00"));
echo $datetime; //Output : 2014-03-10T05:40:00+00:00
这篇关于DateTime从如何使RFC 3339的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文