[plug] Translating Unix time stamps into useable dates
Bevan Broun
bevanb at ee.uwa.edu.au
Mon Apr 5 12:37:05 WST 1999
on Mon, Apr 05, 1999 at 12:21:24PM +0800, Michael Hunt <Michael.J.Hunt at usa.net> 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 ?
There are c routines to do this. See mktime(3). There are probably perl
functions to do the same. There is also a package called mktime which
gives command line interface - see
http://www.interlog.com/~john/technogeek/source/mktime/
BB
--
Bevan Broun ph (08) 9380 1587
Computer Systems Officer fax (08) 9380 1065
Dept. Electrical and Electronic Engineering
University of Western Australia rm. G70
More information about the plug
mailing list