List Info

Thread: valid rss feed help FYI




valid rss feed help FYI
user name
2006-10-25 20:17:49
OK  now I get the error:

Can't locate object method "strfdate" via package
"DateTime"

I looked at the code for bricolage/lib/Bric/Util/Time.pm
and see that on line 286 this is called:

      return datetime($date,
$tz)->set_time_zone('UTC')->strftime 
(DB_DATE_FORMAT)

which looks like the structure you are using below David.

Also I see that the strfdate() method is a part of the perl
DateTime  
module 
http://search.cpan.org/dist/DateTime/lib/DateTime.pm
so I don't know why this error message is coming up unless
something  
like

      $doc>get_cover_date(Bric::Config::ISO_8601_FORMAT
))

isn't formatted the way datetime() expects it to be
formatted?

Or could I be I missing a required perl module?

Dawn

On 24-Oct-06, at 11:20 PM, David E. Wheeler wrote:

> On Oct 24, 2006, at 15:31, Dawn Buie wrote:
>
>> 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
>
> Oops. Try this:
>
>    <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>
>
>> 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 ?
>
> No, I just was missing the parentheses, and you put it
in in the  
> wrong place (good guess, though).
>
>> 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)?
>
> You should leave it alone. The datetime() function will
populate it  
> from your Time Zone preference.
>
> Best,
>
> David
>
>

[1]

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