On 08/22/10 18:09, Alan Curry wrote: > There might be less occurrences of this misunderstanding if we could teach > date that -d 4/14/1991 is not actually a request for 4/14/1991 00:00:00, but > "any time that existed during the day 4/14/1991", or perhaps a more specific > "the first second of 4/14/1991". > > Has that been considered and rejected already, or is it just waiting for > someone to implement it?
As far as I know nobody has ever suggested that, and it is a reasonable suggestion. However, it would not fix the problem in general, since in some cases there is no "first second of date X", even when X is valid. For example: $ TZ=Pacific/Kwajalein date -d 1993-08-20 date: invalid date `1993-08-20' There was no time during the day 1993-08-20, because at midnight Kwajalein moved the clocks ahead by 24 hours. Perhaps the semantics could be "the first second whose time stamp is on or after 1993-08-20 00:00:00", though then we'd have to deal with bug reports from people on Kwajalein saying "wait a minute: I asked for August 20, but it gave me August 21!". Aren't dates fun?