Is it possible to turn a normal date into an ISO 8601 time format?

Posted by Nathan on Stack Overflow See other posts from Stack Overflow or by Nathan
Published on 2011-11-23T01:41:44Z Indexed on 2011/11/23 1:50 UTC
Read the original article Hit count: 130

Filed under:
|

I am trying to turn this type of format of the date:

Thursday, November 10th, 2011 at 10:37 PM

Into an ISO 8601 format (with PHP). How can I do this? I've tried:

date("c", $row2['time'])

Obviously, that's not correct, because the timeago jQuery plugin is saying "41 years ago", and that is definitely not 41 years ago.

Is it not possible to turn that kind of date into the ISO 8601 format?

I've tried searching for this and I haven't found any solutions on how to turn this format into ISO 8601.

© Stack Overflow or respective owner

Related posts about php

Related posts about php-date