diff options
author | Jim Meyering <jim@meyering.net> | 1994-09-17 01:58:43 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1994-09-17 01:58:43 +0000 |
commit | e1b35181ba5ad8d6aef2b74f252360e37c484df7 (patch) | |
tree | 7be2fcf45da6c26500e1f007be3f246157068c79 /doc/sh-utils.texi | |
parent | b4baf84d322bb09eb218c0b7cd77e7d155c4f02b (diff) | |
download | coreutils-e1b35181ba5ad8d6aef2b74f252360e37c484df7.tar.xz |
.
Diffstat (limited to 'doc/sh-utils.texi')
-rw-r--r-- | doc/sh-utils.texi | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/doc/sh-utils.texi b/doc/sh-utils.texi index 0f18f5fb3..e589b79e5 100644 --- a/doc/sh-utils.texi +++ b/doc/sh-utils.texi @@ -1999,7 +1999,7 @@ Synopsis: @example date [ @var{option} ]@dots{} [ +@var{format} ] @c -[@var{MMDDhhmm}[[@var{CC}]@var{YY}][.@var{ss}] ] +date [ @var{option} ] [@var{MMDDhhmm}[[@var{CC}]@var{YY}][.@var{ss}] ] @end example @findex strftime @r{and @code{date}} @@ -2143,6 +2143,11 @@ a horizontal tab If given an argument that does not start with @samp{+}, @code{date} sets the system clock to the time and date specified by that argument. +The @samp{--date} and @samp{--set} options may not be used with +such an argument. +The @samp{--universal} option may be used with this date format to indicate +that the specified time and date are relative to Coordinated Universal Time +rather than to the local time zone. The argument must consist entirely of digits, which have the following meaning: @@ -2163,6 +2168,8 @@ last two digits of year (optional) second (optional) @end table +@comment FIXME: Mention that --set=STRING may also be used to set the clock. +@comment FIXME: --set=STRING is a GNU extension. You must have appropriate privileges to set the system clock. @@ -2220,19 +2227,19 @@ Here are a few examples. @item To print the date of the day before yesterday: @example -date --date '2 days ago' +date --date='2 days ago' @end example @item To print the date of the day three months and one day hence: @example -date --date '3 months 1 day' +date --date='3 months 1 day' @end example @item To print the day of year of Christmas in the current year: @example -date --date '25 Dec' +%j +date --date='25 Dec' +%j @end example @item @@ -2253,6 +2260,19 @@ the padding altogether. date -d 1-may '+%B %-d' @end example +@item +To print the current date and time in the format required by some +versions of @code{date} when setting the system clock: +@example +date +%m%d%H%M%Y.%s +@end example + +@item +To set the system clock forward by two minutes: +@example +date --set='+2 minutes' +@end example + @end itemize |