Browse Source

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 <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
master
Jonathan Druart 1 month ago
committed by Fridolin Somers
parent
commit
6ddb8c9e25
  1. 16
      tools/additional-contents.pl

16
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;

Loading…
Cancel
Save