@@ -, +, @@ (part 1) - misc/cronjobs/batch_anonymise.pl - misc/cronjobs/cleanup_database.pl - misc/cronjobs/gather_print_notices.pl - misc/cronjobs/serialsUpdate.pl - misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl - Carefully review code changes. - Verify that the cronjobs behave as before. --- misc/cronjobs/batch_anonymise.pl | 1 - misc/cronjobs/cleanup_database.pl | 1 - misc/cronjobs/gather_print_notices.pl | 1 - misc/cronjobs/serialsUpdate.pl | 4 ++-- misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl | 6 +++--- 5 files changed, 5 insertions(+), 8 deletions(-) --- a/misc/cronjobs/batch_anonymise.pl +++ a/misc/cronjobs/batch_anonymise.pl @@ -31,7 +31,6 @@ BEGIN { use C4::Context; use C4::Circulation; -use C4::Dates; use Date::Calc qw( Today Add_Delta_Days --- a/misc/cronjobs/cleanup_database.pl +++ a/misc/cronjobs/cleanup_database.pl @@ -35,7 +35,6 @@ BEGIN { } use C4::Context; -use C4::Dates; use C4::Search; use Getopt::Long; use C4::Log; --- a/misc/cronjobs/gather_print_notices.pl +++ a/misc/cronjobs/gather_print_notices.pl @@ -11,7 +11,6 @@ BEGIN { use CGI qw( utf8 ); # NOT a CGI script, this is just to keep C4::Templates::gettemplate happy use C4::Context; -use C4::Dates; use C4::Debug; use C4::Letters; use C4::Templates; --- a/misc/cronjobs/serialsUpdate.pl +++ a/misc/cronjobs/serialsUpdate.pl @@ -29,10 +29,10 @@ BEGIN { } use C4::Context; -use C4::Dates qw/format_date format_date_in_iso/; use C4::Debug; use C4::Serials; use C4::Log; +use Koha::DateUtils; use Date::Calc qw/Date_to_Days check_date/; use Getopt::Long; @@ -119,7 +119,7 @@ while ( my $issue = $sth->fetchrow_hashref ) { if ( $subscription && $publisheddate && $publisheddate ne "0000-00-00" ) { my $nextpublisheddate = GetNextDate( $subscription, $publisheddate ); - my $today = format_date_in_iso( C4::Dates->new()->output() ); + my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); if ( $nextpublisheddate && $today ) { my ( $year, $month, $day ) = split( /-/, $nextpublisheddate ); --- a/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl +++ a/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl @@ -36,8 +36,8 @@ use C4::Context; use C4::Items; use C4::Letters; use C4::Overdues; -use C4::Dates; use C4::Calendar; +use Koha::DateUtils; sub usage { pod2usage( -verbose => 2 ); @@ -124,8 +124,8 @@ foreach my $type (@types) { } foreach my $issues (@loop) { - my $date = C4::Dates->new( $issues->{'date_due'}, 'iso' ); - my $due_date = $date->output('metric'); + my $date_dt = dt_from_string ( $issues->{'date_due'} ); + my $due_date = output_pref( { dt => $date_dt, dateonly => 1, dateformat =>'metric' } ); my $letter = C4::Letters::GetPreparedLetter( module => $module, --