From addf2511b2da80e27718da8e37679e7a2089063a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Thu, 12 Mar 2015 09:18:17 +0100 Subject: [PATCH] Bug 13813 - Remove deprecated C4::Dates from opac/opac-showreviews.pl To test: This patch removes C4::Dates from opac/opac-showreviews.pl and treats the RSS time stamps the same way as in opac/opac-search.pl To test: - Enable display of 'Recent comments' in OPAC (Syspref OpacShowRecentComments) - In OPAC, go to Home > Recent comments - Test RSS feed - Apply patch - Test RSS feed again, it should work as before --- opac/opac-showreviews.pl | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/opac/opac-showreviews.pl b/opac/opac-showreviews.pl index 2bca5d6..e018085 100755 --- a/opac/opac-showreviews.pl +++ b/opac/opac-showreviews.pl @@ -28,7 +28,6 @@ use C4::Output; use C4::Circulation; use C4::Review; use C4::Biblio; -use C4::Dates; use C4::Members qw/GetMemberDetails/; use POSIX qw(ceil strftime); @@ -57,11 +56,9 @@ my ( $template, $borrowernumber, $cookie ) = &get_template_and_user( ); if($format eq "rss"){ - my $lastbuilddate = C4::Dates->new(); - my $lastbuilddate_output = $lastbuilddate->output("rfc822"); $template->param( rss => 1, - timestamp => $lastbuilddate_output + timestamp => strftime("%Y-%m-%dT%H:%M:%S-00:00", gmtime), ); } @@ -114,9 +111,7 @@ for my $result (@$reviews){ } if($format eq "rss"){ - my $rsstimestamp = C4::Dates->new($result->{datereviewed},"iso"); - my $rsstimestamp_output = $rsstimestamp->output("rfc822"); - $result->{timestamp} = $rsstimestamp_output; + $result->{timestamp} = strftime("%Y-%m-%dT%H:%M:%S-00:00", gmtime); } } ## Build the page numbers on the bottom of the page -- 1.7.10.4