Home| general |src.bin|task| etime Index

etime

Syntax
etime --help
etime [-day] [-year] [name]
Synopsis

Convert the time in a plain ASCII listing to seconds of epoch or seconds of day.

Options
--helpprint the help message and exit.
--versionprint the RST version number and exit.
-dayprint second of day, not second of epoch.
-yearprint second of year, not second of epoch.
namefilename of the ASCII file, if this is omitted the file will be read from standard input.
Description

Converts the date and time recorded in a text data file into a time expressed as seconds from 0:00UT January 1, 1970, seconds from the start of the year, or seconds from the start of a day.

The reformatted text file is written to standard output.

Each line of the data file should consist of a single record. Entries in the record should be space or tab separated and the first six numbers represent the date and time of the record:

year month day hour minute seconds data...

The remainder of the line is the record data.

The program converts the time to the number of seconds from 0:00UT January 1, 1970, or if the "-d" option is specified to the number of seconds from the start of the day.

The converted time followed by the remainder of the record data is written to standard output.

Examples
etime data.txt > data.2.txt

Convert the times in the file "data.txt" to seconds from 0:00UT January 1,1970. The output is written to the file "data.2.txt".

etime -d data.txt > data.2.txt

Convert the times in the file "data.txt" to seconds from the start of the day. The output is written to the file "data.2.txt".