[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    www/international/china/rss
From:       Liang Qi <cavendish.qi () gmail ! com>
Date:       2007-03-21 14:20:49
Message-ID: 1174486849.722882.12549.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 645009 by liangqi:

adjust date format, but not a good way yet

 M  +5 -3      lastRSS.php  


--- trunk/www/international/china/rss/lastRSS.php #645008:645009
@@ -40,7 +40,7 @@
 	var $cp = '';
 	var $items_limit = 0;
 	var $stripHTML = False;
-	var $date_format = '';
+	var $date_format = 'Y.m.d';
 
 	// -------------------------------------------------------------------
 	// Private variables
@@ -158,7 +158,8 @@
 			// If date_format is specified and lastBuildDate is valid
 			if ($this->date_format != '' && ($timestamp = strtotime($result['lastBuildDate'])) !==-1) {
 						// convert lastBuildDate to specified date format
-						$result['lastBuildDate'] = date($this->date_format, $timestamp);
+						// $result['lastBuildDate'] = date($this->date_format, $timestamp);
+						$result['lastBuildDate'] = date('Y.m.d', $timestamp);
 			}
 
 			// Parse TEXTINPUT info
@@ -200,7 +201,8 @@
 					// If date_format is specified and pubDate is valid
 					if ($this->date_format != '' && ($timestamp = strtotime($result['items'][$i]['pubDate'])) !==-1) {
 						// convert pubDate to specified date format
-						$result['items'][$i]['pubDate'] = date($this->date_format, $timestamp);
+						// $result['items'][$i]['pubDate'] = date($this->date_format, $timestamp);
+						$result['items'][$i]['pubDate'] = date('Y.m.d', $timestamp);
 					}
 					// Item counter
 					$i++;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic