localtime and gmtime will do.
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime($sec);
At least it will gve you:
- $hours, $minutes, $seconds
- days as long as it's less than 365 (in $yday)
- years, if you subtract 70 from $year
You'll have to take care of leap years of course.