Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!cica!tut.cis.ohio-state.edu!ucbvax!ulysses!smb From: smb@ulysses.homer.nj.att.com (Steven M. Bellovin) Newsgroups: comp.unix.wizards Subject: Re: Convert string time into seconds? Message-ID: <11780@ulysses.homer.nj.att.com> Date: 11 Jul 89 15:12:19 GMT References: <214@melpar.UUCP> <4760015@hpirs.HP.COM> <303@lancelot> Organization: AT&T Bell Laboratories, Murray Hill Lines: 15 In article <303@lancelot>, lance@lancelot (Lancelot of Caid) writes: > In article <4760015@hpirs.HP.COM>, wk@hpirs.HP.COM (Wayne Krone) writes: > < > I have a user entered time/date in the format: > < > yymmddhhmmss > < > I need to convert this into seconds since the epoch and > What if you DON'T have ANSI C libs? I answered the original posting by email; I'll repeat it publicly. At the cost of a few small syntactic rewrites of that string, getdate() -- part of the netnews src, and in the public domain since I wrote it lo these many years ago -- can do the job. It's overkill, but it will work if you don't want to take the time to do it right for this particular case. --Steve Bellovin