From db10542d33056a07563f151fb20dfdd168f9a064 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 Signed-off-by: Tomas Cohen Arazi Signed-off-by: Fridolin Somers Signed-off-by: Kyle M Hall --- 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 d5d02f00c9..ac384a82c1 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.39.5