From 5e8926042e0805fe7f6dfe161cda3cc71134f53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Sun, 15 Mar 2015 18:15:54 +0100 Subject: [PATCH] Bug 13813 - Remove C4::Dates from cataloguing/value_builder/dateaccessioned.pl To test: Apply patch Edit an item Verifiy that autofilling date in d - Date acquired works as before. --- cataloguing/value_builder/dateaccessioned.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cataloguing/value_builder/dateaccessioned.pl b/cataloguing/value_builder/dateaccessioned.pl index 2ae821a..4ce51ce 100755 --- a/cataloguing/value_builder/dateaccessioned.pl +++ b/cataloguing/value_builder/dateaccessioned.pl @@ -18,7 +18,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use Modern::Perl; - +use Koha::DateUtils; no warnings 'redefine'; =head1 @@ -51,8 +51,7 @@ sub plugin_javascript { # my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_; my $function_name = "dateaccessioned".(int(rand(100000))+1); - require C4::Dates; - my $date = C4::Dates->today('iso'); + my $date = output_pref({ dt => DateTime->now(), dateformat => 'iso', dateonly => 1 }); # find the tag/subfield mapped to items.dateaccessioned my ($tag,$subfield) = GetMarcFromKohaField("items.dateaccessioned",""); -- 1.7.10.4