WFDBTIME(1)

NAME
wfdbtime - convert time to sample number, elapsed, and absolute time

SYNOPSIS
wfdbtime -r record time [ time ... ]

DESCRIPTION

Using the specified record as a reference for determining the length of a sample interval and the absolute time represented by sample number 0, this program accepts one or more time arguments (in WFDB standard time format) and produces one line on the standard output for each such argument. In each output line, the corresponding time is written as a sample number (in the form snnn), as an elapsed time interval in hours, minutes, and seconds from the beginning of the record (in the form hh:mm:ss.sss), and as an absolute time and date (in the form [hh:mm:ss.sss DD/MM/YYYY]). If the base time for the record is undefined, the absolute time cannot be calculated, and in this case the elapsed time appears (a second time) instead.

Additional -r record arguments may be given in the same command, to reset the sample interval length and base time for any subsequent time arguments.

EXAMPLES

The command

    wfdbtime -r mimicdb/237/237 0 10:0 s20 "[14:0:0 20/7/1995]" e

produces the output

                 s0           0:00.000    [12:40:38.000 20/07/1995]
             s75000          10:00.000    [12:50:38.000 20/07/1995]
                s20           0:00.160    [12:40:38.160 20/07/1995]
            s595250        1:19:22.000    [14:00:00.000 20/07/1995]
          s19199992       42:39:59.936    [07:20:37.936 22/07/1995]

Note that the input arguments need not be zero-padded, that an input argument in absolute time format must be quoted to protect the brackets from the shell, and that the input argument e is evaluated as the time of the last sample in the input record.

ENVIRONMENT

It may be necessary to set and export the shell variable WFDB (see setwfdb(1)).

FILES

record.hea
    header file

SEE ALSO
time2sec(1)
http://www.physionet.org/physiotools/wpg/strtim.htm (for further details about standard time format and additional examples)

AUTHOR
George B. Moody (george@mit.edu)

SOURCE
http://www.physionet.org/physiotools/wfdb/app/wfdbtime.c