[geeklog-cvs] Geeklog-1.x/system/classes/syndication rss.feed.class.php, 1.14, 1.15
Michael Jervis
mjervis at qs1489.pair.com
Tue Jul 29 15:06:48 EDT 2008
Update of /cvsroot/geeklog/Geeklog-1.x/system/classes/syndication
In directory qs1489.pair.com:/tmp/cvs-serv95522/system/classes/syndication
Modified Files:
rss.feed.class.php
Log Message:
Fix for bug #0000696 (formatting of RSS feed dates) from Mystral_KK (also happens to fix issues on windows with rubbish timezones)
Index: rss.feed.class.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/system/classes/syndication/rss.feed.class.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** rss.feed.class.php 19 Feb 2008 06:49:02 -0000 1.14
--- rss.feed.class.php 29 Jul 2008 19:06:41 -0000 1.15
***************
*** 270,287 ****
function _RFC822DateFormat($timestamp='')
{
- // Cache the current timezone:
- $cache_timezone = setlocale(LC_TIME,0);
- // Time locales that will give us the required output
- $timezones = array('en_GB','en_US');
- setlocale(LC_TIME,$timezones); // set to whichever the system supports.
// format the date
if(!empty($timestamp))
{
! $time = strftime( '%a, %d %b %Y %H:%M:%S %z', $timestamp);
} else {
! $time = strftime( '%a, %d %b %Y %H:%M:%S %z' );
}
- // Set the timezone back
- setlocale(LC_TIME, $cache_timezone);
// return the time
return $time;
--- 270,280 ----
function _RFC822DateFormat($timestamp='')
{
// format the date
if(!empty($timestamp))
{
! $time = date( 'r', $timestamp);
} else {
! $time = date( 'r' );
}
// return the time
return $time;
More information about the geeklog-cvs
mailing list