Then I learned this trick on a Perl forum:
-ulianov<?php
$DAY = 3600 * 24;
$stat = stat('c:\WINDOWS\bootstat.dat');
$mtime = $stat['mtime'];
$dT = time() - $mtime;
$d = intval($dT / $DAY); $dT -= $d * $DAY;
$h = intval($dT / 3600); $dT -= $h * 3600;
$m = intval($dT / 60); $dT -= $m * 60;
$s = $dT;
$pl = "s"; if($d == 1) { $pl = ""; }
printf("up %d day%s %d:%02d:%02d\n", $d,$pl, $h,$m,$s);
?>