bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Bug report for "date"


From: Paul Grinberg
Subject: RE: Bug report for "date"
Date: Tue, 28 Jul 2009 19:57:56 -0400

Phil,

 As I said...it is a workaround, since ins Solaris you cannot execute
that command:

# date -R --date="-14 days"
date: illegal option -- R
date: illegal option -- date=-14 days
usage:  date [-u] mmddHHMM[[cc]yy][.SS]
        date [-u] [+format]
        date -a [-]sss[.fff]


Best,
Paul


-----Original Message-----
From: Philip Rowlands [mailto:address@hidden 
Sent: Tuesday, July 28, 2009 7:56 PM
To: Paul Grinberg
Cc: address@hidden
Subject: RE: Bug report for "date"

On Tue, 28 Jul 2009, Paul Grinberg wrote:

> Shell script for Solaris....It can go future as long as I want, but
past
> only 6 days....
>
>
http://www.isrcomputing.com/index.php?option=com_content&view=article&id
=125:unix-shell-script-to-calculate-date-in-the-future-and-in-the-past&c
atid=38:technology-tips&Itemid=82

That script is using (/abusing) TZ beyond its stated purpose. As Bob 
suggests, GNU date can perform date calculations with relative offsets, 
e.g.

$ date -d 'now + 12 days'
Mon Aug 10 00:55:32 BST 2009


Cheers,
Phil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]