X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=misc%2Fcronjobs%2Foverdue_notices.pl;h=cb9ffa2ec683a63dd90ffe1215ede6af2a89e3b0;hb=39d1b7e61b4e11d76e443f7755aba96e3cf13ab6;hp=af3790d384f365c0c9acc31d60b2937858a09416;hpb=31a3a7ed9353958e3f684fffc62316caf21e3e77;p=koha.git diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index af3790d384..cb9ffa2ec6 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -323,7 +323,7 @@ if (@branchcodes) { # these are the fields that will be substituted into <> my @item_content_fields = split( /,/, $itemscontent ); -binmode STDOUT, ':encoding(UTF-8)'; +binmode( STDOUT, ':encoding(UTF-8)' ); our $csv; # the Text::CSV_XS object @@ -350,8 +350,8 @@ if ( defined $htmlfilename ) { if ( $htmlfilename eq '' ) { $html_fh = *STDOUT; } else { - my $today = C4::Dates->new(); - open $html_fh, ">",File::Spec->catdir ($htmlfilename,"notices-".$today->output('iso').".html"); + my $today = DateTime->now(time_zone => C4::Context->tz ); + open $html_fh, ">",File::Spec->catdir ($htmlfilename,"notices-".$today->ymd().".html"); } print $html_fh "\n";