date.1 (1390B)
- .\" Collection of Unix tools, comparable to coreutils
- .\" Copyright 2017-2022 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
- .\" SPDX-License-Identifier: MPL-2.0
- .Dd 2023-06-03
- .Dt DATE 1
- .Os
- .Sh NAME
- .Nm date
- .Nd display date and time
- .Sh SYNOPSIS
- .Nm
- .Op Fl u
- .Op Fl d Ar datetime
- .Op Cm + Ns Ar format
- .Sh DESCRIPTION
- When
- .Nm
- is invoked without arguments it displays the current datetime
- Otherwise, depending on the options specified, will print the datetime in a user-defined way.
- .Bl -tag -width Ds
- .It Fl d Ar datetime
- .Ar datetime
- can contain the Unix timestamp (number of seconds before and after 1970-01-01T00:00:00Z) prefixed by an @ (at) symbol,
- or a date-time formatted as
- .Ql YYYY-MM-DDThh:mm:SS[frac][Z] ,
- see
- .Xr touch 1
- for more details on the format.
- .It Fl u
- Use UTC (coordinated universal time) instead of the local time.
- .El
- .Pp
- The plus operand
- .Pq Sq +
- specifies in which format the datetime should be displayed, the format string is specified in the
- .Xr strftime 3
- manual page.
- .Sh ENVIRONMENT
- Look at the manual page of
- .Xr strftime 3
- for the environment variables, typical ones are
- .Ev TZ ,
- .Ev LC_TIME and
- .Ev LC_ALL but that depends on your system.
- .Sh EXIT STATUS
- .Ex -std
- .Sh SEE ALSO
- .Xr strftime 3
- .Sh STANDARDS
- .Nm
- is mostly compliant with the
- .St -p1003.1-2008
- specification.
- .Sh AUTHORS
- .An Haelwenn (lanodan) Monnier Aq Mt contact@hacktivis.me