TIME2SEC (July 1998) ftools.time TIME2SEC (July 1998) NAME time2sec -- Calculate the number of seconds between an input date and time and a reference date and time. USAGE time2sec date time leapfile DESCRIPTION This task calculates the time interval in seconds between the input date and time and the reference date and time. The result is written both to the screen and into the parameter file. The dates must be of the form yyyy-mm-dd or dd/mm/yy (19yy only). The time must be in the form hh:mm:ss.ddd. This task takes leap seconds after January, 1970 into account. PARAMETERS date [string] The absolute date to be converted to an offset time. Must be in the form yyyy-mm-dd or dd/mm/yy (19yy assumed). Leading 0s ARE required. time [string] The absolute time to be converted to an offset. Must be in the form hh:mm:ss.ss. Single digits may be used, but at least a 0 in each value is required. 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 date from which the offset is calculated. (timezero=0:0:0) [string] The time from which the offset is calculated. (offset=) [double] The output time interval in seconds between the input date and time and the reference date and time. EXAMPLES 1. Calculate the offset in seconds from 1993-01-01 0:0:0 to 1994-03-02 12:23:23.1 using the leapsec.fits file in the refdata directory. ti> time2sec 1994-03-02 12:23:23.1 FTOOLS datezero="01/01/93" BUGS SEE ALSO sec2time