View | Details | Raw Unified | Return to bug 5374
Collapse All | Expand All

(-)a/C4/Biblio.pm (+9 lines)
Lines 3241-3246 sub ModBiblioMarc { Link Here
3241
            $record->insert_grouped_field( MARC::Field->new( 100, "", "", "a" => $string ) );
3241
            $record->insert_grouped_field( MARC::Field->new( 100, "", "", "a" => $string ) );
3242
        }
3242
        }
3243
    }
3243
    }
3244
3245
    #enhancement 5374: update transaction date (005) for marc21/unimarc
3246
    if($encoding =~ /MARC21|UNIMARC/) {
3247
      my @a= (localtime) [5,4,3,2,1,0]; $a[0]+=1900; $a[1]++;
3248
        # YY MM DD HH MM SS (update year and month)
3249
      my $f005= $record->field('005');
3250
      $f005->update(sprintf("%4d%02d%02d%02d%02d%04.1f",@a)) if $f005;
3251
    }
3252
3244
    my $oldRecord;
3253
    my $oldRecord;
3245
    if ( C4::Context->preference("NoZebra") ) {
3254
    if ( C4::Context->preference("NoZebra") ) {
3246
3255
(-)a/cataloguing/value_builder/marc21_field_005.pl (-22 / +4 lines)
Lines 19-25 Link Here
19
19
20
use strict;
20
use strict;
21
#use warnings; FIXME - Bug 2505
21
#use warnings; FIXME - Bug 2505
22
use C4::Context;
22
#use C4::Context;
23
23
24
=head1
24
=head1
25
25
Lines 52-77 sub plugin_javascript { Link Here
52
    my $function_name= $field_number;
52
    my $function_name= $field_number;
53
53
54
    # find today's date
54
    # find today's date
55
    my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
55
    my @a= (localtime) [5,4,3,2,1,0]; $a[0]+=1900; $a[1]++;
56
    $year +=1900;
56
    my $date = sprintf("%4d%02d%02d%02d%02d%04.1f",@a);
57
    $mon +=1;
57
58
    if (length($mon)==1) {
59
        $mon = "0".$mon;
60
    }
61
    if (length($mday)==1) {
62
        $mday = "0".$mday;
63
    }
64
    if (length($hour)==1) {
65
        $hour = "0".$hour;
66
    }
67
    if (length($min)==1) {
68
        $min = "0".$min;
69
    }
70
    if (length($sec)==1) {
71
        $hour = "0".$sec;
72
    }
73
74
    my $date = "$year$mon$mday$hour$min$sec".".0";
75
    my $res  = "
58
    my $res  = "
76
<script type=\"text/javascript\">
59
<script type=\"text/javascript\">
77
//<![CDATA[
60
//<![CDATA[
78
- 

Return to bug 5374