Files
plan9port/man/man1/date.1
Dmitri Vereshchagin 10564b1175 tmac/tmac.an: define .MR in a groff compatible way
groff 1.23.0 added .MR to its -man macro package.  The NEWS file states
that the inclusion of the macro "was prompted by its introduction to
Plan 9 from User Space's troff in August 2020."  From d32deab it seems
that the name for Plan 9 from User Space's implementation was suggested
by groff maintainer G. Brandon Robinson.

Not sure if the intention was to make these definitions compatible, but
it would be nice if they were.

Currently, Plan 9 from User Space's .MR expects its second argument to
be parenthesized.  groff's .MR does not.  This results in extra
parentheses appearing in manual references when viewing Plan 9 from User
Space's manual pages on a system using groff.
2025-07-27 09:58:50 -04:00

62 lines
1.1 KiB
Groff

.TH DATE 1
.SH NAME
date, clock \- date and time
.SH SYNOPSIS
.B date
[
.I option
] [
.I seconds
]
.br
.B clock
.SH DESCRIPTION
Print the date, in the format
.PP
.B
Tue Aug 16 17:03:52 CDT 1977
.PP
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.
.PP
The conversion from Greenwich Mean Time to local time depends on the
.B $timezone
environment variable; see
.MR ctime 3 .
.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
.\" .PP
.\" .I Clock
.\" draws a simple analog clock in its window.
.SH SOURCE
.B \*9/src/cmd/date.c
.br
.B \*9/src/cmd/draw/clock.c