From (struct tm) to (time_t) ?

Jay M. Libove root at libove.UUCP
Sun Oct 23 00:03:19 AEST 1988


Well, there are wonderful functions standard with C for getting the
system date in long int (time_t) format, and for converting it to a
pretty structure (struct tm) with all the pieces broken out... but
there is no way I know of to fill in such a structure and make a
time_t out of it... e.g. for System V "touch" which allows a date
argument to be given.

Does anyone have the code for this (struct tm) to (time_t) conversion?

Thanks!

-- 
Jay Libove		ARPA:	jl42 at andrew.cmu.edu or libove at cs.cmu.edu
5731 Centre Ave, Apt 3	BITnet:	jl42 at andrew or jl42 at drycas
Pittsburgh, PA 15206	UUCP:	uunet!nfsun!libove!libove or
(412) 362-8983		UUCP:	psuvax1!pitt!darth!libove!libove



More information about the Comp.lang.c mailing list