I'm not sure what kind of problem the Zend Feed
component can confront when dealing with your code,
but if I may, you can extract the date as a Unix
timestamp directly from MySQL using it's built-in
function:

    UNIX_TIMESTAMP(date),

then format it in PHP with a  simple:

    date('r', $row->timestamp),

or you can even format an RFC 2822 compliant date
inside your query with MySQL's
    DATE_FORMAT(date, format),
which works pretty much like PHP's date function.

http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html




--- Bill YILDIRIM <[EMAIL PROTECTED]> wrote:

> Hi there,
> I have been playing with Zend_Feed since yesterday.
> I finally managed to 
> create my first rss feed. I have on problem though.
> This is how I 
> convert mysql datetime to rss date time
>             $newstime = $thisProduct->addDate;
>             list($date, $hours) = split(' ',
> $newstime);
>             list($year,$month,$day) =
> split('-',$date);
>             list($hour,$min,$sec) =
> split(':',$hours);
>  
>             //returns the date ready for the rss
> feed
>             $date = date('r',mktime($hour, $min,
> $sec, $month, $day, 
> $year)); 
> but when I reach the feed, it shows the current date
> and time?
> does it suppose to work like this?
> 
> Thanks
> B
> 



      
____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

Reply via email to