On Fri, Jun 20, 2003 at 03:36:06PM +0300, Murat USTUNTAS wrote: > On my system, some users have expire day user settings. I write a > (python) script > then parse the: 7.th selection in the master.passwd > > blabla:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:1064005200:xxxx:xxxx:xxxx:xxxx > > How can I conver the number like 1064005200 to human readable date format ? > Or, there is a way to collect the information from a command interactively ?
That date is given as the number of seconds since the epoch (1 Jan 1970, 00:00 UTC), which is the standard Unix time_t internal time/date representation. You can convert it into human readable format by: % date -r 1064005200 Fri Sep 19 22:00:00 BST 2003 Or from within Python, you should have access to strftime(3) or equivalent which will convert a time_t into a human-readable time/date. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK
Description: PGP signature