.help time2sec "July 1998" ftools.time
.ih
NAME
time2sec -- Calculate the number of seconds between an input date and time and
a reference date and time.
.ih
USAGE
time2sec date time leapfile
.ih
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
.ls 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.
.le
.ls 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.
.le
.ls 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.
.le
.ls (datezero=1993-01-01) [string]
The date from which the offset is calculated.
.le
.ls (timezero=0:0:0) [string]
The time from which the offset is calculated.
.le
.ls (offset=) [double]
The output time interval in seconds between the input date and time and the
reference date and time.
.le
.ih
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"
.fi
.ih
BUGS
.ih
SEE ALSO
sec2time
.endhelp
