You are here: Re: [PHP] Convert a timestamp to RFC822?? « PHP « IT news, forums, messages
Re: [PHP] Convert a timestamp to RFC822??

Posted by Jordan Miller on 10/21/25 11:26

we *just* had a post similar to this. It's easy, just use the date()
and strtotime() functions:

$timestamp = '2004-05-14 13:24:48';
$RFC_formatted = date('r', strtotime($timestamp));

done!

Jordan


On Sep 10, 2005, at 11:14 AM, Brian Dunning wrote:

> I get my timestamp from the db in this format (I don't have control
> over this):
>
> 2004-05-14 13:24:48
>
> I need to convert it to RFC822 to make it a valid RSS pubDate field
> like this:
>
> Wed, 02 Oct 2002 13:00:00 GMT
>
> How can I do that? I'm tearing my hair out here (what's left)...
>
> :)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация