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

Re: invalid date from date -d 1969-12-31



On Tue, Jan 28, 2003 at 10:32:45AM -0500, George Georgalis wrote:
> On Mon, Jan 27, 2003 at 11:36:36PM -0800, Eric G. Miller wrote:
> >On Mon, Jan 27, 2003 at 10:59:47PM -0500, Stan Heckman wrote:
> >> On my system, date -d returns "invalid date" for dates before 1970. It
> >> is possible that this began when I upgraded libc6. Any suggestions?
> >
> >1970-01-01 is time zero for *nixen.  You're asking about what happened
> >before the big bang!  Guess "date" is not as generally useful for
> >reformatting dates as it could be.  However, its primary function is to
> >set/print the current date/time which is always more recent than 1970.
> 
> Guess again. It works fine here... debian 3.0r1
> $ date -d "1/15/1905"
> Sun Jan 15 00:00:00 EST 1905
> $ date -d "1/15/1905" +%s
> -2049994800

$ export LANG="C"
$ date -d "1/15/1905"
date: invalid date `1/15/1905'

Mmm, I guess it's a bug in sid's date...

-- 
echo ">gra.fcw@2ztr< eryyvZ .T pveR" | rot13 | reverse



Reply to: