575 |
|
$self->_SaveEnvFile(); |
576 |
|
} |
577 |
|
|
578 |
+ |
sub reqdoc() |
579 |
+ |
{ |
580 |
+ |
my $self=shift; |
581 |
+ |
my ($path)=@_; |
582 |
+ |
return $path."/".$self->{reqdoc}; |
583 |
+ |
} |
584 |
+ |
|
585 |
+ |
sub creationtime() |
586 |
+ |
{ |
587 |
+ |
my $self=shift; |
588 |
+ |
my ($location)= @_; |
589 |
+ |
$location||=$self->location(); |
590 |
+ |
my $requirementsdoc = $self->reqdoc($location); |
591 |
+ |
my ($mode, $time) = (stat($requirementsdoc))[2, 9]; |
592 |
+ |
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($time); |
593 |
+ |
|
594 |
+ |
($sec < 10) ? ($sec = "0".$sec) : $sec; |
595 |
+ |
($min < 10) ? ($min = "0".$min) : $min; |
596 |
+ |
|
597 |
+ |
$year += 1900; |
598 |
+ |
my $months = |
599 |
+ |
{ |
600 |
+ |
0 => "Jan", 1 => "Feb", |
601 |
+ |
2 => "Mar", 3 => "Apr", |
602 |
+ |
4 => "May", 5 => "Jun", |
603 |
+ |
6 => "Jul", 7 => "Aug", |
604 |
+ |
8 => "Sept", 9 => "Oct", |
605 |
+ |
10 => "Nov", 11 => "Dec" }; |
606 |
+ |
|
607 |
+ |
my $days = { 1 => "Mon", 2 => "Tue", 3 => "Wed", 4 => "Thu", 5 => "Fri", 6 => "Sat", 7 => "Sun"}; |
608 |
+ |
|
609 |
+ |
# Return the timestamp (as string) of the requirementsdoc: |
610 |
+ |
return $days->{$wday}."-".$mday."-".$months->{$mon}."-".$year." ".$hour.":".$min.":".$sec; |
611 |
+ |
} |
612 |
+ |
|
613 |
|
# ---- support routines |
614 |
|
|
615 |
|
sub _SaveEnvFile |