For some reason, the creation date is displayed as early as 1970. :) Although the database indicates 20-08-2011.

Here is the code

echo "<?xml version=\"1.0\" encoding=\"windows-1251\"?> <rss version=\"2.0\"> <channel> <title>новости на сайте о рисовании</title> <link>http://draw-art.ru</link> <description>Здесь вы можете прочитать всякие новости посвященые искуству рисованию и всем связаным с этим</description> <language>ru</language>"; echo "<item>". "<title>".strip_tags($myrow['title'])."</title>". "<link>http://draw-art.ru/blog_look.php?id=".$myrow['id']."</link>". "<description><![CDATA[".$myrow['description']."]]></description>". "<pubDate>".date("r",$myrow['date'])."</pubDate>". "<guid>http://draw-art.ru/blog_look.php?id=".$myrow['id']."</guid>". "</item>"; 

    1 answer 1

    Apparently, $myrow['date'] not Unix time and is therefore set to 0.

    Try or modify the query

     SELECT *, UNIX_TIMESTAMP(date) as udate 

    and accordingly output date("r",$myrow['udate'])

    Or translate already in the code:

     date('r', strtotime($myrow['date']))