From fd051c10bf19b5c133f7e73f4b4b2565219cc9a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Sun, 15 Mar 2015 18:37:50 +0100 Subject: [PATCH] Bug 13813 - Remove C4::Dates from tools/koha-news.pl To test: Apply patch Go to Home > Tools > News Verify that dates appear as expected in date columns Create and edit news, verify dates behave as expected. --- tools/koha-news.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/koha-news.pl b/tools/koha-news.pl index cf1e2b4..debe533 100755 --- a/tools/koha-news.pl +++ b/tools/koha-news.pl @@ -28,20 +28,20 @@ use CGI qw ( -utf8 ); use C4::Auth; use C4::Koha; use C4::Context; -use C4::Dates qw(format_date_in_iso); use C4::Output; use C4::NewsChannels; use C4::Languages qw(getTranslatedLanguages); use Date::Calc qw/Date_to_Days Today/; use C4::Branch qw/GetBranches/; +use Koha::DateUtils; my $cgi = new CGI; my $id = $cgi->param('id'); my $title = $cgi->param('title'); my $new = $cgi->param('new'); -my $expirationdate = format_date_in_iso($cgi->param('expirationdate')); -my $timestamp = format_date_in_iso($cgi->param('timestamp')); +my $expirationdate = output_pref({ dt => dt_from_string( $cgi->param('expirationdate') ), dateformat => 'iso', dateonly => 1 }); +my $timestamp = output_pref({ dt => dt_from_string( $cgi->param('timestamp') ), dateformat => 'iso', dateonly => 1 }); my $number = $cgi->param('number'); my $lang = $cgi->param('lang'); my $branchcode = $cgi->param('branch'); -- 1.7.10.4