datefmt

format unix timestamps over stdin
git clone git://jb55.com/datefmt
Log | Files | Refs | README | LICENSE

datefmt.1 (1391B)


      1 .\" Generated by scdoc 1.11.2
      2 .\" Complete documentation for this program is not available as a GNU info page
      3 .ie \n(.g .ds Aq \(aq
      4 .el       .ds Aq '
      5 .nh
      6 .ad l
      7 .\" Begin generated content:
      8 .TH "datefmt" "1" "1980-01-01"
      9 .P
     10 .SH NAME
     11 .P
     12 datefmt - format timestamps in text streams
     13 .P
     14 .SH SYNPOSIS
     15 .P
     16 \fBdatefmt\fR [--after timestamp] [--before timestamp] [--past] [--future] [--version] [--ms]
     17 .P
     18 .SH DESCRIPTION
     19 .P
     20 \fBdatefmt\fR is a tool that formats timestamps in text streams.\& For example,
     21 if you have a log file with unix timestamps, you can pipe it to datefmt
     22 to convert these timestamps into formatted dates.\&
     23 .P
     24 .SH OPTIONS
     25 .P
     26 \fB-a, --after <timestamp>\fR
     27 .RS 4
     28 only format timestamps after this date (default: 2000-01-01Z)
     29 .P
     30 .RE
     31 \fB-b, --before <timestamp>\fR
     32 .RS 4
     33 only format timestamps before this date 
     34 .P
     35 .RE
     36 \fB-p, --past\fR
     37 .RS 4
     38 only format timestamps in the past
     39 .P
     40 .RE
     41 \fB-f, --future\fR
     42 .RS 4
     43 only format timestamps in the future
     44 .P
     45 .RE
     46 \fB-m, --ms\fR
     47 .RS 4
     48 interpret timestamps as milliseconds instead of seconds
     49 .P
     50 .RE
     51 \fB-r, --relative\fR
     52 .RS 4
     53 relative timestmap formatting
     54 .P
     55 .RE
     56 \fB--version\fR
     57 .RS 4
     58 display version and exit
     59 .P
     60 .RE
     61 .SH FORMAT
     62 .P
     63 a strftime(3) format string.\& defaults to '\&%F %R'\&.\& The default can be changed
     64 with the \fBDEFAULT_DATEFMT\fR environment variable.\&
     65 .P
     66 .SH EXAMPLE
     67 .P
     68 datefmt --after $(date -d yesterday +%s) %R < log.\&txt