[Top][All Lists]

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

Re: date gives error on valid input

From: Bob Proulx
Subject: Re: date gives error on valid input
Date: Wed, 24 Dec 2008 22:24:51 -0700
User-agent: Mutt/1.5.18 (2008-05-17)

Carlos Carvalho wrote:
> % date -d 2008-10-19
> date: invalid date `2008-10-19'
> This happens with 5.97 and 6.10 in Debian.

This works okay for me using Debian.

  $ date -R -d 2008-10-19
  Sun, 19 Oct 2008 00:00:00 -0600

However reversing months and days causes it to be invalid for me.

  $ date -R -d 2008-19-10
  date: invalid date `2008-19-10'

What happens if you reverse months and days?  I suspect it will work.
I suspect a locale issue.

What locale are you using?  You can determine your current locale
information using the 'locale' command.


What timezone are you in?  You can have date print the timezone.

  $ date "+%Z %z"
  MST -0700

Try this to force a standard locale and timezone.

  TZ=UTC LC_ALL=C date -R -d 2008-10-19

Does it succeed for you?


reply via email to

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