logo

utils

~/.local/bin tools and git-hooks git clone https://hacktivis.me/git/utils.git

date.1 (1300B)


  1. .\" Collection of Unix tools, comparable to coreutils
  2. .\" Copyright 2017-2022 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. .\" SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
  4. .Dd 2022-03-11
  5. .Dt DATE 1
  6. .Os
  7. .Sh NAME
  8. .Nm date
  9. .Nd display date and time
  10. .Sh SYNOPSIS
  11. .Nm
  12. .Op Fl u
  13. .Op Fl d Ar datetime
  14. .Op Cm + Ns Ar format
  15. .Sh DESCRIPTION
  16. When
  17. .Nm
  18. is invoked without arguments it displays the current datetime
  19. Otherwise, depending on the options specified, will print the datetime in a user-defined way.
  20. .Bl -tag -width Ds
  21. .It Fl d Ar datetime
  22. .Ar datetime
  23. can contain the Unix timestamp (number of seconds before and after 1970-01-01T00:00:00Z) prefixed by an @ (at) symbol.
  24. .It Fl u
  25. Use UTC (coordinated universal time) instead of the local time.
  26. .El
  27. .Pp
  28. The plus operand
  29. .Pq Sq +
  30. specifies in which format the datetime should be displayed, the format string is specified in the
  31. .Xr strftime 3
  32. manual page.
  33. .Sh ENVIRONMENT
  34. Look at the manual page of
  35. .Xr strftime 3
  36. for the environment variables, typical ones are
  37. .Ev TZ ,
  38. .Ev LC_TIME and
  39. .Ev LC_ALL but that depends on your system.
  40. .Sh EXIT STATUS
  41. .Ex -std
  42. .Sh SEE ALSO
  43. .Xr strftime 3
  44. .Sh STANDARDS
  45. .Nm
  46. is mostly compliant with the
  47. .St -p1003.1-2008
  48. specification.
  49. .Sh AUTHORS
  50. .An Haelwenn (lanodan) Monnier Aq Mt contact@hacktivis.me