]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/seconds
dd(1): update manpage to match program
[plan9front.git] / sys / man / 1 / seconds
1 .TH SECONDS 1 
2 .SH NAME
3 seconds \- convert human-readable date (and time) to seconds since epoch
4 .SH SYNOPSIS
5 .B seconds
6 .I date
7 \&...
8 .SH DESCRIPTION
9 .I Seconds
10 prints the number of seconds since 1 Jan 1970
11 corresponding to one or more human-readable
12 .IR date s.
13 Each
14 .I date
15 must be
16 .I one
17 argument;
18 it will usually be necessary to enclose it in quotes.
19 .PP
20 .I Seconds
21 accepts a somewhat wider range of input than just output from
22 .IR date (1).
23 The main requirement is that the date must be fully specified,
24 with a day of month, month and year
25 in any order.
26 The month must be an English name (or abbreviation),
27 not a number, and the year must contain 4 digits.
28 Unambiguous time-zone names are understood (i.e., not
29 .LR IST )
30 or time zones may be written as
31 .IR ±hhmm .
32 Case is ignored.
33 .SH EXAMPLES
34 Print the names of all files under
35 .L \&.
36 modified since the start of 23 May 2011.
37 .IP
38 .EX
39 du -ta | awk '$1 >= '^`{seconds '23 may 2011'}^' {print $2}'
40 .EE
41 .SH SOURCE
42 .B /sys/src/cmd/seconds.c
43 .SH SEE ALSO
44 .IR date (1),
45 .IR du (1),
46 .IR mtime (1),
47 .IR ctime (2)
48 .SH BUGS
49 All-numeric dates, popular in the USA, are simply ambiguous,
50 more so if the year is truncated to 2 digits.