]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/date
date(1): sync with reality
[plan9front.git] / sys / man / 1 / date
1 .TH DATE 1
2 .SH NAME
3 date, clock \- date and time
4 .SH SYNOPSIS
5 .B date
6 [
7 .I -unitm
8 ] [
9 .B -f
10 .I format
11 ] [
12 .I seconds
13 ]
14 .br
15 .B clock
16 .SH DESCRIPTION
17 Print the date, in the format
18 .PP
19 .B
20         Tue Aug 16 17:03:52 CDT 1977
21 .PP
22 Or the format specified by the format option.
23
24 The options are
25 .TP
26 .B -u
27 Report Greenwich Mean Time (GMT) rather than local time.
28 .TP
29 .B -n
30 Report the date as the number of seconds since the
31 epoch, 00:00:00 GMT, January 1, 1970.
32 .TP
33 .B -i
34 Report the date as ISO-8601 without time and timezone suffix.
35 .TP
36 .B -t
37 Report the date as ISO-8601 with time and timezone suffix.
38 .TP
39 .B -f
40 Print using the format specified by the
41 .I format
42 string rather than the default. Format strings are in the format used by
43 .IR tmdate (2)
44
45 .PP
46 The conversion from Greenwich Mean Time to local time depends on the
47 .B $timezone
48 environment variable; see
49 .IR ctime (2).
50 .PP
51 If the optional argument
52 .I seconds
53 is present, it is used as the time to convert rather than
54 the real time.
55 .PP
56 .I Clock
57 draws a simple analog clock in its window.
58 .SH FILES
59 .TF /adm/timezone/local
60 .TP
61 .B /env/timezone
62 Current timezone name and adjustments.
63 .TP
64 .B /adm/timezone
65 A directory containing timezone tables.
66 .TP
67 .B /adm/timezone/local
68 Default timezone file, copied by
69 .IR init (8)
70 into
71 .BR /env/timezone .
72 .PD
73 .SH SOURCE
74 .B /sys/src/cmd/date.c
75 .br
76 .B /sys/src/cmd/clock.c
77 .SH "SEE ALSO"
78 .IR tmdate (2)