On 15/03/2011, at 9:18 PM, Joce Jovanov wrote:
> On Tue, Mar 15, 2011 at 12:44 AM, Simon J Welsh <[email protected]> wrote:
>
>> On 15/03/2011, at 12:32 PM, Jordan wrote:
>>
>>> Hello Evrybody,
>>>
>>> Can i convert IETF format (ex: "Wed, 18 Oct 2009 13:00:00 EST") in
>> ISO8601 format (ex: "2009-11-05T13:15:30Z")
>>>
>>> Does somebody know some php scripte or similar?
>>>
>>> Thanks...
>>
>> strtotime() (http://php.net/strtotime) and date() (http://php.net/date).
>> There's even a DATE_ISO8601 constant for the correct date format.
>>
>> ---
>> Simon Welsh
>> Admin of http://simon.geek.nz/
>>
>> Who said Microsoft never created a bug-free program? The blue screen never,
>> ever crashes!
>>
>> http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e
>>
>>
> Hi again,
> Thanks for the email,
> do you alredy know some function who will convert IETF format to ISO8601
You'd use the strtotime function to convert the IETF format to a timestamp,
then then date function to convert that timestamp to ISO8601.
Something like date(DATE_ISO8601, strtotime('IETF format string')).
---
Simon Welsh
Admin of http://simon.geek.nz/
Who said Microsoft never created a bug-free program? The blue screen never,
ever crashes!
http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php