On 12/7/2011 10:48 AM, Jack wrote: > Hello All, > > I have a problem where Dates are coming out as 12.31.1969 19:00:00 which of > course we didn't have PC's in 1969 > > I'm not able to see where the date is getting screwed up, any ideas?? > > // > ############################################################################ > # > function ShowFeed_RSS($XmlRoot) { > $title = GetFirstChildContentByPath($XmlRoot, "channel/title"); > $link = GetFirstChildContentByPath($XmlRoot, "channel/link"); > $desc = GetFirstChildContentByPath($XmlRoot, "channel/description"); > # Next 2 lines display the title of the feed, and feed description > # echo "<font face=arial color=blue size =2><b><a > href=\"$link\">$title</a></b>\n"; > # echo "$desc"; > $nodelist = GetChildrenByPathAndName($XmlRoot, "channel", "item"); > if (!$nodelist) return 0; > foreach ($nodelist as $nl) { > $title = GetFirstChildContentByName($nl, "title"); > $link = GetFirstChildContentByName($nl, "link"); > $desc = GetFirstChildContentByName($nl, "description"); > $creator = GetFirstChildContentByName($nl, "author"); > # if (!$creator) $creator = GetFirstChildContentByName($nl, > "dc:creator"); > # echo "JACK" . $nl . "<br>"; > # $pubdate = GetFirstChildContentByName($nl, "pubDate"); > if (!isset($pubdate)) $pubdate = GetFirstChildContentByName($nl, > "dc:date"); > # if (!$pubdate) $pubdate = GetFirstChildContentByName($nl, "dc:date"); > if (isset($pubdate)) $pubdate = strtotime($pubdate); > if (isset($pubdate)) $pubdate = strftime("%m.%d.%Y %H:%M:%S", $pubdate); > $out = $creator; > if ( ($creator != "") && ($pubdate != "") ) $out .= " @ "; > $out .= $pubdate; > echo "<a class=\"rss-link\" href=\"$link\"><b>$title</b></a>"; > echo "<font size=1 color=\"black\"> $out<br>"; > echo "<font size=2>$desc<br><br>"; > # echo "<font size=1 class=rss-link>This is not green</font>"; > } > # this line is after each rss feed group > # echo "<hr>\n"; > } > Thanks! > Jack Can you supply an example of the data you are feeding this. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ C - (541) 408-5189 O - (541) 323-9113 H - (541) 323-4219 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php