Manual Reference Pages  - accudate (1)

NAME

accudate - shows dates or elapsed times to the millisecond.

CONTENTS

Synopsis
Description
Options
Examples
See Also
License
Copyright
Acknowledgements
Authors

SYNOPSIS

accudate [ -h -? -help --help --? ]
accudate [options...]

DESCRIPTION

accudate emits time and date related information with more accuracy than the standard date program. This information is written to stdout. It may be used to create time stamps or to measure elapsed times. Times are shown down to the millisecond but since the program itself requires finite time to run output may not be significant to the final digit.

accudate may be obtained from:

Use of accudate is subject to the License terms.

This document describes accudate version 1.0.5 of 01-NOV-2004.

OPTIONS

[none]
  write time as YYYY-MM-DD:hh:mm:ss.lll to stdout. This fixed width, fixed field, format is easily sorted or parsed. The numeric fields are:
    YYYY year
    MM   month
    DD   day of the month
    hh   hours (24 hour clock)
    mm   minutes
    ss   seconds
    lll  milliseconds
    
-s
  write time instead as YYYY-MM-DD hh:mm:ss.lll to stdout.
-touch
  write time instead as YYYYMMDDhhmm.ss to stdout. For use with the unix "touch" program.
-toff seconds
  Add seconds to the current time before emitting it. This value may be positive or negative. Common offsets are:hour=3600, day=86400, week=604800, 1year (365 days)=1536000. WARNING: consider leap years, daylight savings, time zones, and so forth!
-t0
  Write time as seconds microseconds to stdout. These values may then be fed back into the program later with the -df or -ds flags to show elapsed times.
-df seconds microseconds
  Write elapsed time as DDDD-hh:mm.ss.lll to stdout. The value of seconds microseconds having been previously generated using the -t0 flag. Use this format to time very long events, up to 9999 days.
-ds seconds microseconds
  Write elapsed time as ssssss.lll to stdout. The value of seconds microseconds having been previously generated using the -t0 flag. Use this format to time very short events.
-h -help --help -? --??
  Print the help message. (Default - do not print help message.)
-i
  Emit version, copyright, license and contact information.( Default - do not emit information.)

EXAMPLES

% accudate -h % echo `accudate` "message" >>logfile % STARTTIME=`accudate -t0`
% other operations
% echo `accudate -df $STARTTIME` "message" >>logfile % STARTTIME=`accudate -t0`
% other operations
% echo `accudate -ds $STARTTIME` "message" >>logfile % STARTTIME=`accudate -t0`
% accudate -ds $STARTTIME % accudate -ds $STARTTIME % accudate -ds $STARTTIME % touch -t `accudate -toff -3600 -touch` filename

SEE ALSO

none

LICENSE

You may run this program on any platform. You may redistribute the source code of this program subject to the condition that you do not first modify it in any way. You may distribute binary versions of this program so long as they were compiled from unmodified source code. There is no charge for using this software. You may not charge others for the use of this software.

COPYRIGHT

Copyright (C) 2002, 2003, 2004 David Mathog and Caltech.

ACKNOWLEDGEMENTS

none

AUTHORS

David Mathog, Biology Division, Caltech <mathog@caltech.edu>


accudate (1) 01 Nov 2004