pjs/cck/build/date.pl

26 строки
592 B
Perl
Исходник Обычный вид История

1999-04-06 01:06:29 +04:00
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
print "time... $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst \n";
#$days = $yday + 1;
$mon = $mon + 1;
$len = length($mon);
if ($len < 2) {
$mon = 0 . $mon
}
$len = length($mday);
if ($len < 2) {
$mday = 0 . $mday
}
1999-04-07 23:15:23 +04:00
$len = length($hour);
if ($len < 2) {
$hour = 0 . $hour
}
1999-04-07 02:38:01 +04:00
$year = $year + 1900;
1999-04-06 01:06:29 +04:00
1999-04-07 23:15:23 +04:00
$Blddate = $year . "-" . $mon . "-" . $mday . "-" . $hour;
1999-04-07 02:38:01 +04:00
open (BDATE, ">c:\\CCKScripts\\bdate.bat") || die "cannot open c:\\CCKScripts\\bdate.bat: $!";
1999-04-06 01:06:29 +04:00
print BDATE "set BuildID=$Blddate\n";