SCIENTIFIC-LINUX-USERS Archives

October 2004

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Alan J. Flavell" <[log in to unmask]>
Reply To:
Alan J. Flavell
Date:
Mon, 25 Oct 2004 13:20:55 +0100
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (28 lines)
I noticed that the yum cron task (cron.daily/yum.cron) is returning
mail with the Subject: header containing a date such as "10/23/04".

This is potentially ambiguous in an international context. Soon, this
is going to read something like "03/04/05": who can say whether that
means 4th March 2005 (USA vernacular), 3rd April 2005 (common European
usage, modulo details of punctuation), or even 5th April 2003, without
some additional data to help us?

At risk of seeming pedantic, I'd like to put in a plea that any and
all occurrences of ambiguous date formats should be replaced on sight
with an unambiguous format.  I don't particularly care what format is
used, ISO-ish or RFC-ish or whatever, but please let's at least make
it unambiguous.  If it's needed as part of a filename, rather than
merely for information, then e.g yyyy-mm-dd would be fine by me.

For this specific instance, it appears that the harm is done here:

        TODAY="$(date +%D)"

and then this inappropriate format is used as $TODAY in a couple
of places ("echo" and "/bin/mail -s") for information.

Perhaps a hunt for the string '%D' in the source materials would be
useful for locating other possible fixworthy spots...?

best regards

ATOM RSS1 RSS2