How can convert user expired days in human readable ?
m.seaman at infracaninophile.co.uk
Fri Jun 20 05:35:36 PDT 2003
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
> 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
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030620/1e21ae9f/attachment.bin
More information about the freebsd-questions