.help sec2time "July 1998" ftools.time
.ih
NAME
sec2time -- Convert a time offset in seconds relative to some reference date
and time to an absolute date and time.
.ih
USAGE
sec2time offset leapfile
.ih
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.
.ih
PARAMETERS
.ls offset [real]
The number of seconds from the zero date and time.
.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 reference date in yyyy-mm-dd or dd/mm/yy (19yy only) format from which
the offset is calculated.
.le
.ls (timezero= '00:00:00') [string]
The reference time in hh:mm:ss.ddd format from which the offset is calculated.
.le
.ls (date) [string]
The calculated absolute date in yyyy-mm-dd format.  This is a task output
parameter.
.le
.ls (time) [string]
The calculated absolute time in hh.mm.ss.ddd format.  This is a task output
parameter.
.le
.ls (mjd) [real]
The calculated Modified Julian Day Number.  This is a task output parameter.

.le
.ih
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.
.fi
.ih
BUGS
.ih
SEE ALSO
time2sec
.endhelp
