Ignore:
Timestamp:
2010-04-08T16:05:31+12:00 (11 years ago)
Author:
davidb
Message:

Documents now have 'lastmodifieddate' added as metadata in yyyymmdd format

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/doc.pm

    r21566 r21862  
    8686        my $file_stat = stat($source_path);
    8787    my $mtime = $file_stat->mtime;
     88    my ($seconds, $minutes, $hours, $day_of_month, $month, $year,
     89        $wday, $yday, $isdst) = localtime($mtime);
     90
     91    my $date_modified = sprintf("%d%02d%02d",1900+$year,$month+1,$day_of_month);
     92
    8893    $self->add_utf8_metadata($self->get_top_section(), "lastmodified", $file_stat->mtime);
     94    $self->add_utf8_metadata($self->get_top_section(), "lastmodifieddate", $date_modified);
    8995    }
    9096}
     
    279285    if (-e "$hashfile_exe") {
    280286#   $result = `\"$hashfile_exe\" \"$filename\"`;
     287#   $result = `hashfile$osexe \"$filename\" 2>&1`;
    281288    $result = `hashfile$osexe \"$filename\"`;
     289
    282290    ($result) = $result =~ /:\s*([0-9a-f]+)/i;
    283291    } else {
Note: See TracChangeset for help on using the changeset viewer.