Convert string time into seconds?

Steven M. Bellovin smb at ulysses.homer.nj.att.com
Wed Jul 12 01:12:19 AEST 1989


In article <303 at lancelot>, lance at lancelot (Lancelot of Caid) writes:
> In article <4760015 at hpirs.HP.COM>, wk at 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



More information about the Comp.unix.wizards mailing list