gaim/www

Fixed parsing of dates in the RSS script.

2003-12-22, Christian Hammond
4451042e9501
Parents c765e9958583
Children 764582f4773f
Fixed parsing of dates in the RSS script.
--- a/htdocs/rss.php Mon Dec 22 15:26:02 2003 -0500
+++ b/htdocs/rss.php Mon Dec 22 15:43:08 2003 -0500
@@ -1,5 +1,17 @@
<?php
+ function left($str, $num)
+ {
+ return substr($str, 0, $num);
+ }
+
+ function rss_parse_date($date)
+ {
+ $timestamp = strtotime($date);
+
+ return date("r", $timestamp);
+ }
+
function rss_header($title, $description, $url)
{
print "<?xml version=\"1.0\"?>\n\n";
@@ -23,6 +35,8 @@
$title = htmlentities($title);
+ $date = rss_parse_date($date);
+
print " <item>\n";
print " <title>$title</title>\n";
print " <pubDate>$date</pubDate>\n";