need "yy-ddd-hh:mm:ss ==> (time_t) clock" converter

Tim Singletary tsingle at sunland.gsfc.nasa.gov
Sat Jan 19 04:08:47 AEST 1991


Help!  I need something to convert yy-ddd-hh:mm:ss (i.e. year,
day_of_year, hour, minute, second) to a unix-style
_number_of_seconds_since_00:00:00_GMT,_Jan._1,_1970_.

I tried to use Sun's timelocal() function but couldn't get it to work (it
lets you pass both _day_of_year_ and _month,_day_of_month_ with no way
to specify which is correct!).

Ideally what I'm looking for is source code to a timelocal() function,
but any tips or suggestions will be appreciated.

Thanks in advance, 

tim

--
Tim Singletary, August Automation Inc., (301) 286-7942
--
NRA extremist, etc.



More information about the Comp.unix.programmer mailing list