[plug] Translating Unix time stamps into useable dates
Trevor Phillips
phillips at central.murdoch.edu.au
Mon Apr 5 12:46:35 WST 1999
Michael Hunt wrote:
>
> Does antyone know of a formula that I can use to translate unix time stamps
> like 923056282 into a useable date. I gater that this should be fairly
> simple as it is just a seconds count from January the 1st 1970. The thing
> that I am looking for is how to take into account leap years etc where the
> number of hours, minutes, seconds is not the same for other years. Is there
> an inbuilt utilty for U*nix that can do this for me ?
I know Perl has a function to do it, so you could do something like:
perl -e 'print localtime(923056282)."\n";'
--
. Trevor Phillips - http://jurai.murdoch.edu.au/ .
: CWIS Technical Officer - T.Phillips at murdoch.edu.au :
| IT Services - Murdoch University |
>------------------- Member of the #SAS# & #CFC# --------------------<
| On nights such as this, evil deeds are done. And good deeds, of /
| course. But mostly evil, on the whole. /
\ -- (Terry Pratchett, Wyrd Sisters) /
More information about the plug
mailing list