From 3fba24861cde4402d3aeb763203de36f922d02a0 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 16 Dec 2021 16:44:30 +0100 Subject: [PATCH] Bug 29717: Remove unecessary DT manipulations from tools/additional-contents.pl DBIC handles DateTime correctly, no need for this output_pref call. Test plan: Create a new content, set the dates, confirm they are set correctly Modify the content, modify the dates, confirm they are stored correctly Signed-off-by: Lucas Gass --- tools/additional-contents.pl | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/tools/additional-contents.pl b/tools/additional-contents.pl index e63a44a809..30ef99eb51 100755 --- a/tools/additional-contents.pl +++ b/tools/additional-contents.pl @@ -87,21 +87,9 @@ elsif ( $op eq 'add_validate' ) { my $expirationdate; if ( $cgi->param('expirationdate') ) { - $expirationdate = output_pref( - { - dt => dt_from_string( scalar $cgi->param('expirationdate') ), - dateformat => 'iso', - dateonly => 1 - } - ); + $expirationdate = dt_from_string( scalar $cgi->param('expirationdate') ); } - my $published_on = output_pref( - { - dt => dt_from_string( scalar $cgi->param('published_on') ), - dateformat => 'iso', - dateonly => 1 - } - ); + my $published_on = dt_from_string( scalar $cgi->param('published_on') ); my $number = $cgi->param('number'); my $success = 1; -- 2.20.1