SEC2TIME (July 1998) ftools.time SEC2TIME (July 1998) NAME sec2time -- Convert a time offset in seconds relative to some reference date and time to an absolute date and time. USAGE sec2time offset leapfile DESCRIPTION This task takes a reference date and time and a specified number of seconds from that time and calculates the corresponding new date and time. This task is useful for interpreting the time values recorded in some FITS files which are given in units of seconds relative to some start time. The calculated date, time, and MJD are written both to the terminal and into the parameter file. This task takes leapseconds after January, 1970 into consideration. PARAMETERS offset [real] The number of seconds from the zero date and time. leapfile [string] The name of the file which contains a list of leapseconds. If FTOOLS is entered, then the leapsec.fits file in the ftools refdata directory is used. If CALDB is entered, then the current LEAPSECS dataset in the Calibration Database is used. If the refdata directory or a Caldb is not available at your site, then a leap seconds file can be obtained via anonymous ftp to legacy.gsfc.nasa.gov:/caldb/data/gen/bcf/leapsec*.fits. Please note: you will need to set up the Caldb environment before accessing the Database. See your local Caldb administrator for details. (datezero= "1993-01-01") [string] The reference date in yyyy-mm-dd or dd/mm/yy (19yy only) format from which the offset is calculated. (timezero= '00:00:00') [string] The reference time in hh:mm:ss.ddd format from which the offset is calculated. (date) [string] The calculated absolute date in yyyy-mm-dd format. This is a task output parameter. (time) [string] The calculated absolute time in hh.mm.ss.ddd format. This is a task output parameter. (mjd) [real] The calculated Modified Julian Day Number. This is a task output parameter. EXAMPLES 1. Calculate the absolute time which is 86500 seconds from 1993-01-01 00:00:00 ft> sec2time 86500 FTOOLS The calculated time and date are 00:01:40.000 on 1993-01-02. The Modified Julian Day is 48989.0011574. BUGS SEE ALSO time2sec