My input date is 2014-03-10 05:40:00
. How can I convert it to RFC format like 2014-3-10T05:40:00.000-00:00
?
The RFC-3339 date-time format is used in a number of specifications such as the Atom Syndication Format. Show activity on this post. You don't need to write your own conversion code.
RFC 3339 Date and Time on the Internet: Timestamps July 2002 Appendix A. ISO 8601 Collected ABNF This information is based on the 1988 version of ISO 8601. There may be some changes in the 2000 revision. ISO 8601 does not specify a formal grammar for the date and time formats it defines.
It’s ISO 8601 standard for Datetime. And for people that already familiar with ISO 8601, the RFC 3339 is pretty similar. What’s different? So, if you look again at the RFC document. RFC 3339 use/follow the ISO 8601 profile for the Internet DateTime.
Email Date/Time Format The date/time format used by Internet Mail as defined by RFC 2822 [ IMAIL-UPDATE ]. Internet Date/Time Format The date format defined in section 5 of this document. Timestamp This term is used in this document to refer to an unambiguous representation of some instant in time.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With