src/hg/encode/encodeValidate/doEncodeValidate.pl 1.178
1.178 2009/04/20 17:33:16 tdreszer
If dateSubmitted is ddf ctime, then dateRestricted should use the same.
Index: src/hg/encode/encodeValidate/doEncodeValidate.pl
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/encode/encodeValidate/doEncodeValidate.pl,v
retrieving revision 1.177
retrieving revision 1.178
diff -b -B -U 4 -r1.177 -r1.178
--- src/hg/encode/encodeValidate/doEncodeValidate.pl 16 Apr 2009 19:03:30 -0000 1.177
+++ src/hg/encode/encodeValidate/doEncodeValidate.pl 20 Apr 2009 17:33:16 -0000 1.178
@@ -1081,9 +1081,8 @@
############################################################################
# Main
-my $now = time();
my @ddfHeader; # list of field names on the first line of DDF file
my %ddfHeader = (); # convenience hash version of @ddfHeader (maps name to field index)
my @ddfLines = (); # each line in DDF (except for fields header); value is a hash; e.g. {files => 'foo.bed', cell => 'HeLa-S3', ...}
my %ddfSets = (); # info about DDF entries broken down by ddfKey
@@ -1242,10 +1241,10 @@
# Open dataset descriptor file (DDF)
my @glob = glob "*.DDF";
push(@glob, glob "*.ddf");
my $ddfFile = Encode::newestFile(@glob);
-my $fileTime = (stat($ddfFile))->ctime;
-my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($fileTime);
+my $ddfFileTime = (stat($ddfFile))->ctime;
+my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($ddfFileTime);
HgAutomate::verbose(2, "Using newest DDF file \'$ddfFile\'\n");
my $lines = Encode::readFile($ddfFile);
@@ -1574,9 +1573,9 @@
$metadata .= ' dataVersion="' . $Encode::dataVersion .'"';
if($submitDir =~ /(\d+)$/) {
$metadata .= " subId=$1";
}
- my (undef, undef, undef, $rMDay, $rMon, $rYear) = Encode::restrictionDate($now);
+ my (undef, undef, undef, $rMDay, $rMon, $rYear) = Encode::restrictionDate($ddfFileTime); # Use DDF time
$metadata .= sprintf(" dateSubmitted=%04d-%02d-%02d", 1900 + $year, $mon + 1, $mday);
$metadata .= sprintf(" dateUnrestricted=%04d-%02d-%02d", 1900 + $rYear, $rMon + 1, $rMDay);
HgAutomate::verbose(2, " View: $view\n");