My date(1) man page has the text below near the end (from date (GNU
coreutils) 8.13), which seems to provide the information you want.

The info/man dichotomy in GNU is unfortunate, especially since lots of
distributions don't have info pages available unless you install the -doc
package for the utility. info was a good idea when there was no internet or
Google, it's less useful now.  Searching for "date coreutils" quickly gets
you to this:


http://www.gnu.org/software/coreutils/manual/html_node/date-invocation.html#date-invocation

>From date(1):

EXAMPLES
       Convert seconds since the epoch (1970-01-01 UTC) to a date

              $ date --date='@2147483647'

       Show the time on the west coast of the US (use tzselect(1) to find
TZ)

              $ TZ='America/Los_Angeles' date

       Show the local time for 9AM next Friday on the west coast of the US

              $ date --date='TZ="America/Los_Angeles" 09:00 next Fri'

DATE STRING
       The  --date=STRING  is  a mostly free format human readable date
string such as "Sun, 29 Feb 2004
       16:21:42 -0800" or "2004-02-29 16:21:42" or even "next Thursday".
A  date  string  may  contain
       items  indicating  calendar  date,  time  of day, time zone, day of
week, relative time, relative
       date, and numbers.  An empty string indicates the beginning of the
day.  The date  string  format
       is more complex than is easily documented here but is fully
described in the info documentation.


On Sun, Mar 17, 2013 at 2:57 PM, Robert Citek <[email protected]>wrote:

> On Sun, Mar 17, 2013 at 10:00 AM, Carl Fitch <[email protected]> wrote:
> > Very interesting! On my MAcBook there is not a --date parameter and -d
> is:
> >
> >>      -d dst  Set the kernel's value for daylight saving time.  If dst
> is non-zero, future calls to gettimeofday(2)
> >>              will return a non-zero for tz_dsttime.
> >
> >
> > My experience with --date was as a way to convert formats in bash
> scripts:
> >
> >>  date +%F --date=05/12/1953
> >> 1953-05-12
>
> Exactly.  One use of the date command is to display various date/time
> formats.  By default, date uses the current system time and timezone.
> But the --date= option enables date to use an alternate date/time
> specified by STRING.  What range of possible strings are valid is not
> immediately obvious.  It's as though the STRING section of the manual
> was omitted.
>
> Some examples:
>
> # default, today, now -- all equivalent
> date
> date --date=now
> date --date=today
>
> # unix epoch
> date --date=@0
> date --date=@0 -u
>
> # past, future
> date --date=yesterday
> date --date=tomorrow
> date --date="next week"
> date --date="last week"
>
> # future day of week, Sunday-Saturday, abbreviations work.  Midnight
> local timezone.
> date --date=sat
> date --date=sat -u
>
> # 1-2 digit number == today's hour (0-23), local timezone, unless specified
> date --date=10
> date --date=10 -R
> date --date=10 -R -u
>
> # 3-4 digit numbers == today's time
> date --date=010
> date --date=1010
>
> # 5-?? digit numbers == a date; 6-digit dates are assumed to be 1900
> or 2000 years
> date --date=71010 -u
> date --date=871010 -u
> date --date=0871010 -u
> date --date=9871010 -u
> date --date=19871010 -u
>
> What surprises me is that I have not found any of this information
> described in the man pages.  Instead, it is documented in the info
> pages, but again somewhat cryptically and with few examples.
>
> Regards,
> - Robert
>
> --
> --
> Central West End Linux Users Group (via Google Groups)
> Main page: http://www.cwelug.org
> To post: [email protected]
> To subscribe: [email protected]
> To unsubscribe: [email protected]
> More options: http://groups.google.com/group/cwelug
> ---
> You received this message because you are subscribed to the Google Groups
> "Central West End Linux Users Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
> --
> David Dooling
>

-- 
-- 
Central West End Linux Users Group (via Google Groups)
Main page: http://www.cwelug.org
To post: [email protected]
To subscribe: [email protected]
To unsubscribe: [email protected]
More options: http://groups.google.com/group/cwelug
--- 
You received this message because you are subscribed to the Google Groups 
"Central West End Linux Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to