List Info

Thread: valid rss feed help FYI




valid rss feed help FYI
user name
2006-10-24 22:31:18
>> Ah, so the difference is the time zone? I didn't
know that UTC  
>> (the "Z" is for Zulu, AKA UTC) was
required by the spec. But you  
>> should know that, while that *will* validate, the
time will be  
>> wrong, because get_cover_date doesn't output UTC,
it outputs  
>> whatever's in your time zone preference. So try
this, instead:
>>
>>    <dc:date><% Bric::Util::Time::datetime(
>>        $doc->get_cover_date(
>>            Bric::Config::ISO_8601_FORMAT
>>       
)->set_time_zone('UTC')->stftime('%Y-%m-%dT%H:%M:%SZ')
>>    %></dc:date>
>>
>> Yeah, that's ugly, thanks to the fact that the
Bricolage date  
>> attributes are returned as strings rather than
objects. Anyone  
>> want to take on changing that?
>

Unfortunately that didn't work- even though I did add
another close  
parentheses at the end:

)   %></dc:date>



When I tried republishing the rss feed I got the error:

Can't call method "set_time_zone" without a
package or object  
reference at
/home/tyeefish/bricolage/data/burn/comp/oc_1032/util/xml/ 
output_rss_feed.mc line 80

Line 80 is the code above.

I then looked up  $story->get_cover_date in  
Bric::Biz::Asset::Business  and see:

my $cover_date = $story->get_cover_date($format)

     Returns cover date.

     Throws:

         * Bric::_get() - Problems retrieving fields.
         * Unable to unpack date.
         * Unable to format date.


And I looked at date formatting in Bric::Util::Time  But
it's all a  
bit overwhelming. Am I setting the time zone incorrectly for
  
Bric::Util::Time::datetime ?

my $dt = datetime($iso_format_date, $tz);

Should $tz='UTC' or should I set $tz =1 (meaning it is True,
 
therefore take the defualy timezone -Los Angeles in my case
- and  
make the time zone format show that)?

thank you
Dawn


>

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )