Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!newsfeed.internetmci.com!btnet!dispatch.news.demon.net!demon!xciv.demon.co.uk!usenet From: paul@xciv.org (Paul Civati) Newsgroups: comp.unix.bsd.netbsd.misc Subject: Re: Passwd Expire'ing Date: 17 Nov 1996 14:22:59 GMT Organization: XCIV Lines: 20 Message-ID: <56n743$8d@xciv.demon.co.uk> References: <847976274.19159.0@kevinw.noc.demon.net> <56kvl7$7l@xciv.demon.co.uk> <E0zD41.174@midway.uchicago.edu> Reply-To: paul@xciv.org NNTP-Posting-Host: pantera.xciv.org X-NNTP-Posting-Host: xciv.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Newsreader: knews 0.9.8 In article <E0zD41.174@midway.uchicago.edu>, eric@fudge.uchicago.edu (Eric Fischer) writes: >> Now, how to generate such values for your /etc/passwd, I dunno. I've >> done it before, I had to write some (not very good) code to do it, gets >> difficult when you have to take the various leap year rules into account. > > You really shouldn't have to take leap years into account yourself, > because the time functions already present in the C library will > do it for you. Coo, mktime(), that's mighty handy. :) Last time I did this kind of stuff was on an Atari, in GFA basic and then in C. I don't think either of the C compilers I used (Sozobon then HSC) had mktime(). -Paul- -- Paul Civati =O= Home: paul@xciv.org =O= http://www.xciv.org/ London UK =O= Home: paul@xciv.demon.co.uk =O= Slackware is.