CMS MADE SIMPLE FORGE

CGFeedMaker

 

[#2813] Invalid (locale-dependent) pubDate in generated feeds

avatar
Created By: Yury Zaytsev (zaytsev)
Date Submitted: Thu Dec 25 16:29:51 -0500 2008

Assigned To: Robert Campbell (calguy1000)
Version: 1.0.3
CMSMS Version: None
Severity: Major
Resolution: Fixed
State: Closed
Summary:
Invalid (locale-dependent) pubDate in generated feeds
Detailed Description:
See http://forum.cmsmadesimple.org/index.php/topic,28907.0.html for description
and discussion.

My suggestion is to try

$smarty->assign('rfc_date', date("r", ...));

then

<pubDate>{$entry->rfc_date}</pubDate>

since "r" returns RFC 2822 formatted date and is locale-independent according to
http://ru2.php.net/date .

Simple shell test case:

echo '<?php echo date("r", mktime()) . "\n"; ?>' | LC_ALL=ru_RU.utf8 php

works for me.


History

Comments
avatar
Date: 2008-12-28 04:43
Posted By: Yury Zaytsev (zaytsev)

Please check out the fix I presented here:
http://forum.cmsmadesimple.org/index.php/topic,28907.15.html ... The user
confirmed it fixed the issue.

My modifier at http://test.zaytsev.net/modifier.rfc_date.php.bz2 unlike the fix
committed to CGExtensions SVN does NOT require changing the locale which might
not work on some hosts due to various reasons (per thread / security / missing
locale / different software).
      
avatar
Date: 2008-12-29 04:19
Posted By: Yury Zaytsev (zaytsev)

Fixed in SVN. Thanks, calguy!!!
      
Updates

Updated: 2008-12-29 04:19
resolution_id: 10 => 7
state: Open => Closed

Updated: 2008-12-28 04:43
resolution_id: => 10