(coreutils.info.gz) Options for date

Info Catalog (coreutils.info.gz) Setting the time (coreutils.info.gz) date invocation (coreutils.info.gz) Examples of date
 
 21.1.6 Options for 'date'
 -------------------------
 
 The program accepts the following options.  Also see  Common
 options.
 
 '-d DATESTR'
 '--date=DATESTR'
      Display the date and time specified in DATESTR instead of the
      current date and time.  DATESTR can be in almost any common format.
      It can contain month names, time zones, 'am' and 'pm', 'yesterday',
      etc.  For example, '--date="2004-02-27 14:19:13.489392193 +0530"'
      specifies the instant of time that is 489,392,193 nanoseconds after
      February 27, 2004 at 2:19:13 PM in a time zone that is 5 hours and
      30 minutes east of UTC.
      Note: input currently must be in locale independent format.  E.g.,
      the LC_TIME=C below is needed to print back the correct date in
      many locales:
           date -d "$(LC_TIME=C date)"
       Date input formats.
 
 '-f DATEFILE'
 '--file=DATEFILE'
      Parse each line in DATEFILE as with '-d' and display the resulting
      date and time.  If DATEFILE is '-', use standard input.  This is
      useful when you have many dates to process, because the system
      overhead of starting up the 'date' executable many times can be
      considerable.
 
 '-I[TIMESPEC]'
 '--iso-8601[=TIMESPEC]'
      Display the date using the ISO 8601 format, '%Y-%m-%d'.
 
      The argument TIMESPEC specifies the number of additional terms of
      the time to include.  It can be one of the following:
      'auto'
           Print just the date.  This is the default if TIMESPEC is
           omitted.
 
      'hours'
           Append the hour of the day to the date.
 
      'minutes'
           Append the hours and minutes.
 
      'seconds'
           Append the hours, minutes and seconds.
 
      'ns'
           Append the hours, minutes, seconds and nanoseconds.
 
      If showing any time terms, then include the time zone using the
      format '%z'.
 
 '-r FILE'
 '--reference=FILE'
      Display the date and time of the last modification of FILE, instead
      of the current date and time.
 
 '-R'
 '--rfc-822'
 '--rfc-2822'
      Display the date and time using the format '%a, %d %b %Y %H:%M:%S
      %z', evaluated in the C locale so abbreviations are always in
      English.  For example:
 
           Fri, 09 Sep 2005 13:51:39 -0700
 
      This format conforms to Internet RFCs 2822
      (ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt) and 822
      (ftp://ftp.rfc-editor.org/in-notes/rfc822.txt), the current and
      previous standards for Internet email.
 
 '--rfc-3339=TIMESPEC'
      Display the date using a format specified by Internet RFC 3339
      (ftp://ftp.rfc-editor.org/in-notes/rfc3339.txt).  This is a subset
      of the ISO 8601 format, except that it also permits applications to
      use a space rather than a 'T' to separate dates from times.  Unlike
      the other standard formats, RFC 3339 format is always suitable as
      input for the '--date' ('-d') and '--file' ('-f') options,
      regardless of the current locale.
 
      The argument TIMESPEC specifies how much of the time to include.
      It can be one of the following:
 
      'date'
           Print just the full-date, e.g., '2005-09-14'.  This is
           equivalent to the format '%Y-%m-%d'.
 
      'seconds'
           Print the full-date and full-time separated by a space, e.g.,
           '2005-09-14 00:56:06+05:30'.  The output ends with a numeric
           time-offset; here the '+05:30' means that local time is five
           hours and thirty minutes east of UTC.  This is equivalent to
           the format '%Y-%m-%d %H:%M:%S%:z'.
 
      'ns'
           Like 'seconds', but also print nanoseconds, e.g., '2005-09-14
           00:56:06.998458565+05:30'.  This is equivalent to the format
           '%Y-%m-%d %H:%M:%S.%N%:z'.
 
 '-s DATESTR'
 '--set=DATESTR'
      Set the date and time to DATESTR.  See '-d' above.  See also 
      Setting the time.
 
 '-u'
 '--utc'
 '--universal'
      Use Coordinated Universal Time (UTC) by operating as if the 'TZ'
      environment variable were set to the string 'UTC0'.  Coordinated
      Universal Time is often called "Greenwich Mean Time" (GMT) for
      historical reasons.  Typically, systems ignore leap seconds and
      thus implement an approximation to UTC rather than true UTC.
 
Info Catalog (coreutils.info.gz) Setting the time (coreutils.info.gz) date invocation (coreutils.info.gz) Examples of date
automatically generated by info2html