X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=tools%2Fscheduler.pl;h=5fae73d6132b9b407d4f66497a5951c2d40f6818;hb=1f7f00b626a1adc2303d573bf551026a66c9452f;hp=ad2f5a3c2a756c67b49df7750b1eb0cb3093820a;hpb=e3e84a747f6aa415a390bf21a130f740fdbf5533;p=koha_gimpoz diff --git a/tools/scheduler.pl b/tools/scheduler.pl index ad2f5a3c2a..5fae73d613 100755 --- a/tools/scheduler.pl +++ b/tools/scheduler.pl @@ -20,7 +20,7 @@ use strict; use C4::Context; use C4::Scheduler; -use C4::Reports; +use C4::Reports::Guided; use C4::Auth; use CGI; use C4::Output; @@ -52,8 +52,13 @@ my $mode = $input->param('mode'); my $id = $input->param('id'); if ( $mode eq 'job_add' ) { - my $startdate = - join( '', ( split m|/|, $input->param('startdate') )[ 2, 0, 1 ] ); + + # Retrieving the date according to the dateformat syspref + my $c4date = C4::Dates->new($input->param('startdate')); + + # Formatting it for Schedule::At + my $startdate = join('', (split /-/, $c4date->output("iso"))); + my $starttime = $input->param('starttime'); my $recurring = $input->param('recurring'); $starttime =~ s/\://g;