JP Vossen <[EMAIL PROTECTED]> wrote: > Am I doing something really stupid here? Should date accept the "a" or "p" > shorthand? It seems to me it would be better if it failed instead of > producing output that is *almost* correct... > > /root# date -d "3/1/02 11:59pm" Correct > Fri Mar 1 23:59:00 EST 2002 > > /root# date -d "3/1/02 11:59p" Not > Fri Mar 1 03:59:00 EST 2002 > > /root# date -d "3/1/02 11:59 p" Not > Fri Mar 1 03:59:00 EST 2002
It does that because A-Z are recognized as military time zone names. See lib/getdate.y's military_table array. > /root# date -d "3/1/02 11:59 pm" Correct > Fri Mar 1 23:59:00 EST 2002 > > /root# date -d "3/1/02 11:59a" Not > Fri Mar 1 07:59:00 EST 2002 _______________________________________________ Bug-sh-utils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-sh-utils
