>My goal is to get element 9 of stat which is mtime.  I am getting this
with
>ease, but my end goal is to convert this number back into a readable
format
>giving me how old the file is.
>
>So here is a rough draft formula :  (time in seconds  -  last  MTime ) =
>seconds old.
>
>Convert seconds old to a human readable time stamp using localtime ();
>Any ideas or is there a better way?

Seconds old to human readable via localtime will give you some funny
results (like dates from 1970).

If you're looking for days hours minutes seconds old:
days = seconds old / seconds in a day
seconds left = seconds old % seconds in a day
hours = seconds left / seconds in an hour
seconds left = seconds left % seconds in a hour
minutes = seconds left / seconds in a minute
seconds = seconds left % seconds in a minute




****** CONFIDENTIALITY NOTICE ******
NOTICE: This e-mail message and all attachments transmitted with it may contain 
legally privileged and confidential information intended solely for the use of 
the addressee. If the reader of this message is not the intended recipient, you 
are hereby notified that any reading, dissemination, distribution, copying, or 
other use of this message or its attachments is strictly prohibited. If you 
have received this message in error, please notify the sender immediately and 
delete this message from your system. Thank you.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to