time_convert
[General Utilities]

Convert among the internal DRMS time representation and other time representations. More...

Collaboration diagram for time_convert:

Variables

ModuleArgs_tgModArgs
 Global DRMS-module pointer that refers to module_args.
ModuleArgs_t module_args []
 Global DRMS-module structure representing the default command-line arguments for a DRMS module.

Detailed Description

Convert among the internal DRMS time representation and other time representations.

Synopsis:
   time_convert -h
   time_convert s=<secondsJSOC> | sdo=<secondsSDO> | egse=<secondsEGSE> | time=<calenderTime> |
                ord=<ordinalDate> [o=jsoc | o=sdo | o=egse | o=ord | o=cal] [zone=<zone>] [p=<precision>]
Converts internal DRMS time (seconds since 15 seconds before January 1, 1977 UTC) to an external ascii string representation. The exact external representation depends on the command-line arguments provided to this utility. Possiblities include: SDO time, EGSE time, Ordinal date, and Calendar time. SDO time is the number of seconds that have elapsed since January 1, 1958 TAI, i.e. SDO onboard time. The full format is the string representation of a double data type. EGSE time is the number of seconds that have elapsed since APPROXIMATELY January 1, 2004 UTC (actual epoch is 2003.12.30_23:59:36.000_UTC). The full format is also the string representation of a double data type. Ordinal date is the day number of the year (starting at day 1 on January 1). The full format is YYYY.DDD[_ZZZ], where YYYY is the year, DDD is the day number, and ZZZ is the zone (e.g., UTC, TDT, PDT, etc.). Calendar time gives the year, month, date, hour, minutes, and seconds for a given system of time (like UTC). The full format is specified in JSOC TN 07-001 (http://jsoc.stanford.edu/doc/timerep.html), but in short it looks like:

1. year.month.fracday[_type]
2. year.month.day_hour:minute[:second][_type]
3. {MJD|JD}_julday[_type]
where type refers to the time system or time zone (e.g., UTC, or PST), MJD and JD refer to Modified Julian Date and Julian Date, and julday refers to a Julian day number.

The precision of the seconds field is specified with the p parameter. The default is 0. Setting p=3 will produce output identical to the original version of time_convert.

Alternatively, and with the appropriate command-line parameters, time_convert converts from any supported time representation to any other representation.

If multiple input format strings are specified as arguments (e.g., time_convert s=234235235.35 ord=1982.035), only one will be used. A descriptive string will be printed describing which input string was used. Given a definitive input format, time_convert chooses a default output format. If the input is an internal time, an SDO time, an EGSE time, or an ordinal date, the default output is a calendar time. If the definitive input format is a calendar time, the default output is an internal time. The default output format can be overwritten by providing the o=format argument.

When the output format is either an ordinal time or a calendar time, the time can be expressed in any of several supported time systems (e.g., UTC, TDT, TAI, or even a time zone, like PDT). This is accomplished by supplying the appropriate zone=system argument. Refer to JSOC TN 07-001 (http://jsoc.stanford.edu/doc/timerep.html) for a complete list of the supported "zones".

The default time format is with no fractions of seconds. If o=jsoc is specified the seconds are provided to the nearest ms.

Flags:
-h: Show usage message.
Parameters:
s An input time formatted as an internal time. <secondsJSOC> is seconds since 15 seconds before January 1, 1977 UTC.
sdo An input time formatted as an SDO time. <secondsSDO> is seconds since January 1, 1958 TAI.
egse An input time formatted as an EGSE time. <secondsEGSE> is seconds since 2003.12.30_23:59:36.000_UTC
time An input time formatted as a calendar time. <calenderTime> is as specified in JSOC TN 07-001 (http://jsoc.stanford.edu/doc/timerep.html)
ord An input time formatted as an ordinal date. <ordinalDate> is yyyy.ddd[_zone], where zone is any supported time system as specified in JSOC TN 07-001 (http://jsoc.stanford.edu/doc/timerep.html).
o The output format to be used. "jsoc" refers to internal time; "sdo" refers to SDO time; "egse" refers to EGSE time; "ord" refers to ordinal date; and "cal" refers to calendar time.
Example to convert an internal time to the default output format (UTC calendar time):
   time_convert s=234253535.23
Example to convert an internal time to the default output format (calendar time), but in TAI time:
   time_convert s=234253535.23 zone=TAI
Example to convert an internal time to an EGSE time:
   time_convert s=234253535.23 o=egse
Example to convert an EGSE time to a calendar time in the PDT time zone:
   time_convert egse=232533636.362 o=cal zone=PDT
Example to convert an ordinal time to a calendar time in the TDT system:
   time_convert ord=2007.352 o=cal zone=TDT
Example to convert a calendar time to an internal time:
   time_convert time=1998.02.04_06:00:17.230_UTC
Example to convert a calendar time to an internal time (explicitly):
   time_convert time=1998.02.04_06:00:17.230_UTC o=jsoc
Example to convert a calendar time to an SDO time
   time_convert time=1998.02.04_06:00:17.230_UTC o=sdo

Generated on Mon Mar 26 07:00:54 2018 for JSOC_Documentation by  doxygen 1.5.7.1