2011-03-30 13:49:47 +00:00
|
|
|
.TH DATE 1
|
|
|
|
.SH NAME
|
|
|
|
date, clock \- date and time
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B date
|
|
|
|
[
|
2021-06-20 02:05:00 +00:00
|
|
|
.I -unitm
|
2011-03-30 13:49:47 +00:00
|
|
|
] [
|
2021-06-17 21:12:26 +00:00
|
|
|
.B -f
|
|
|
|
.I format
|
|
|
|
] [
|
2011-03-30 13:49:47 +00:00
|
|
|
.I seconds
|
|
|
|
]
|
|
|
|
.br
|
|
|
|
.B clock
|
|
|
|
.SH DESCRIPTION
|
|
|
|
Print the date, in the format
|
|
|
|
.PP
|
|
|
|
.B
|
|
|
|
Tue Aug 16 17:03:52 CDT 1977
|
|
|
|
.PP
|
2021-06-17 21:12:26 +00:00
|
|
|
Or the format specified by the format option.
|
|
|
|
|
2011-03-30 13:49:47 +00:00
|
|
|
The options are
|
|
|
|
.TP
|
|
|
|
.B -u
|
|
|
|
Report Greenwich Mean Time (GMT) rather than local time.
|
|
|
|
.TP
|
|
|
|
.B -n
|
|
|
|
Report the date as the number of seconds since the
|
|
|
|
epoch, 00:00:00 GMT, January 1, 1970.
|
2012-09-01 12:33:39 +00:00
|
|
|
.TP
|
|
|
|
.B -i
|
|
|
|
Report the date as ISO-8601 without time and timezone suffix.
|
|
|
|
.TP
|
|
|
|
.B -t
|
|
|
|
Report the date as ISO-8601 with time and timezone suffix.
|
2019-09-06 15:25:21 +00:00
|
|
|
.TP
|
2021-06-17 21:12:26 +00:00
|
|
|
.B -f
|
|
|
|
Print using the format specified by the
|
|
|
|
.I format
|
|
|
|
string rather than the default. Format strings are in the format used by
|
|
|
|
.IR tmdate (2)
|
|
|
|
|
2011-03-30 13:49:47 +00:00
|
|
|
.PP
|
|
|
|
The conversion from Greenwich Mean Time to local time depends on the
|
|
|
|
.B $timezone
|
|
|
|
environment variable; see
|
|
|
|
.IR ctime (2).
|
|
|
|
.PP
|
|
|
|
If the optional argument
|
|
|
|
.I seconds
|
|
|
|
is present, it is used as the time to convert rather than
|
|
|
|
the real time.
|
|
|
|
.PP
|
|
|
|
.I Clock
|
|
|
|
draws a simple analog clock in its window.
|
|
|
|
.SH FILES
|
|
|
|
.TF /adm/timezone/local
|
|
|
|
.TP
|
|
|
|
.B /env/timezone
|
|
|
|
Current timezone name and adjustments.
|
|
|
|
.TP
|
|
|
|
.B /adm/timezone
|
|
|
|
A directory containing timezone tables.
|
|
|
|
.TP
|
|
|
|
.B /adm/timezone/local
|
|
|
|
Default timezone file, copied by
|
|
|
|
.IR init (8)
|
|
|
|
into
|
|
|
|
.BR /env/timezone .
|
|
|
|
.PD
|
|
|
|
.SH SOURCE
|
|
|
|
.B /sys/src/cmd/date.c
|
|
|
|
.br
|
|
|
|
.B /sys/src/cmd/clock.c
|
2021-06-17 21:12:26 +00:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.IR tmdate (2)
|