LOGTIME(1)

NAME
logtime - prints date and time in D. E. Shaw & Co. standard format.

SYNOPSIS
logtime [ -d days ] [ -m months ] [ -p ] [ -u ]

DESCRIPTION
Logtime prints the date and time in D. E. Shaw & Co. standard format, viz. YYYYMMDD hh:mm:ss. The time is printed in the local timezone by default.

With the -u option, the time is printed as UTC (GMT to old-timers).

With the -p option, logtime subtracts one day from the date if the time is before 8am. This is a special hack to make scripts that run in the early morning hours generate log files with the previous days date.

With the -d option you can request the date for a given number of days ago and with the -m option the date for a given number of months ago. This can be used to generate paths to old files.

The last specified of the -d, -m and -p flags will take precedence.

SEE ALSO
date(1)

SPECIAL NOTES
Requires GNU date for the -d, -m and -p capabilities, and for 4-digit years.

BUGS
No errors are generated for specifying more than one of the -d, -m and -p flags.

AUTHORS

Mark Moraes
    Original version (descotime) used DESCO datelib extensions to gawk.

Kimmo Suominen
    Current version with GNU date. Added -m option. Revised manual page.

Peter Skopp
    Added -d option.