[Top][All Lists]

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

Re: "date" not validating correctly

From: Bob Proulx
Subject: Re: "date" not validating correctly
Date: Wed, 13 Aug 2003 19:19:14 -0600
User-agent: Mutt/1.3.28i

ianseeks wrote:
> I have been unable to change date on my SuSE 8.2 system.  I've tried
> using the KDE utilities and they did not work

Can't you you there...

> so i tried "date --set 081313012003" on 
> the command line and got this error  "date: invalid date `081321532003'. 

Uh, --set takes a DATESTR which is a completly different format.
Please read either the man page or the info documentation for the
format of the DATESTR.  It really is quite flexible in the strings it
can parse.

  info --index-search="Date input formats" date

Something like:

  date --set '+2 minutes'

What you are wanting with your compact format is to not use the --set
option at all.  The --set option turns on a different parser for human
readable dates.

Try this instead.

  date 081321532003

> I am in the UK using the UK date format.

It does not look like 081313012003 is a UK date format to me.  For a
UK date format I would expect something like "Thu Aug 14 01:04:00 GMT
2003" but don't flame me if I got that wrong.  I just used "LANG=en_GB
TZ=GMT date" to dump that string as I grew up in the colonies.  With
the --set option you could use that type of DATESTR and not the
traditional compact form.

  date --set '13 Aug 2003 13:01:00 +0000'

Date without the --set option takes this documented format of the
traditional form.


See the online standards documentation for more details.


This format is documented on the first page of both the info page and
the man page.

  info date
  man date

> Also note the different quote marks on the error message.

Years ago the quote and back-quote were the common ways to typeset
quotation marks.  Today's computer screen fonts look different than
they did.  Not going to go there but suffice to say it is a heatedly
debated religious war as to what is the correct way to handle those.
By one viewpoint the quotes are correct for text and your screen font
is incorrect.

> I hope this is some use, and i'm not going mad.  :o)

Don't suffer though insanity.  Enjoy every minute of it.

The --set option is a GNU extension to handle human readable date
strings.  Traditional 'date' commands do not implement that
functionality.  I think the examples in the documentation are perhaps
too heavy on the extensions and not enough on the typical use!


reply via email to

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