bug-coreutils
[Top][All Lists]
Advanced

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

bug#26902: good invalid dates vs. bad invalid dates


From: 積丹尼 Dan Jacobson
Subject: bug#26902: good invalid dates vs. bad invalid dates
Date: Sat, 13 May 2017 01:26:49 +0800

Can you please don't say "invalid date" for everything invalid.

$ date -d @1494439601675485
date: invalid date address@hidden
$ date -d 1494439601675485sec
date: invalid date ‘1494439601675485sec’
$ date -d 1494439601675485seconds
date: invalid date ‘1494439601675485seconds’
$ date -d @1494439601675485
date: invalid date address@hidden
$ date -d @1494439601675
date: invalid date address@hidden
$ date -d @1
四  1月  1 08:00:01 CST 1970
$ date -d @149443960167
date: invalid date address@hidden
$ date -d @14944396016
date: invalid date address@hidden
$ date -d @1494439601
四  5月 11 02:06:41 CST 2017
$ date -d @zzzzzz
date: invalid date address@hidden

On (info "(coreutils) Seconds since the Epoch") it says

      Traditional Unix systems count seconds with 32-bit two’s-complement
   integers and can represent times from 1901-12-13 20:45:52 through
   2038-01-19 03:14:07 UTC.  More modern systems use 64-bit counts of
   seconds with nanosecond subcounts, and can represent all the times in

Please catch the cases where the user merely has entered too many digits
for the computer in question, and say
date: too far into the future.
or
date: too far into the future for current computer.
or
date: invalid date: too far into the future for current computer.

Please don't just give the same message that you give if the user hasn't
even entered one digit.





reply via email to

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