sybperl-l Archive
Up Prev Next
From: "Charles Taylor" <taylorc at sybase dot com>
Subject: Year 2000 problems??
Date: Jan 29 1998 4:20PM
Two dumb questions about time;
1)Will the script below work in 2000? till.....
2)This runs on NT, can a millisecond value be extracted?
# Calculate the file modification date
($a,$b,$c,$da,$mo,$yr,$x,$y,$z) = localtime((time)-($age*86400));
$m = ($mo + 1);
$m = sprintf("%02d",$m);
$da = sprintf("%02d",$da);
$c = sprintf("%02d",$c);
$b = sprintf("%02d",$b);
$a = sprintf("%02d",$a);
$yr=(1900 + $yr);
$ACTIVITYdate = "$yr$m$da.$c:$b:$a";
~Chuck
|