ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Cohen" <>
Subject RE: Timestamp attribute processing
Date Tue, 02 Sep 2003 18:52:57 GMT
I appreciate what you are saying.  

What I did so far, and none of it has been submitted yet, was to code my
task to accept either of the ISO8601 formats in DateUtils
(yyyy-MM-ddThh:mm:ss or yyyy-MM-dd) if no format is specified by the
user, OR if the user specifies a time format in the parameters to the
<stcheckout> task, parse only against that single format (and not the
defaults).  While that may fit your definition of a slippery slope, I
really don't think so since the only defaults are standards and anything
non-standard must be specified by the user in the same task-invocation
as the data being passed to the task.
And the "nested exception handler from hell" is only two levels deep.

-----Original Message-----
From: Ken Gentle [] 
Sent: Tuesday, September 02, 2003 1:35 PM
To: Ant Developers List
Subject: Re: Timestamp attribute processing

At 12:56 PM 9/2/2003, you wrote:
>Steve Cohen wrote:
>>Hmm, that's weaker than I would have expected.  If I'd like something 
>>little better, is your recommendation then to add to DateUtils?
>I guess it is time for a date type. I imagine taking java.util.Calendar

>a param would be a nice way to map it (or Date, though that one's lack
>timezones is an eternal source of trouble in the SOAP world)

SOAP and everywhere an application may span timezones.

This sounds like the first step down a very slippery slope of processing

arbitrary date formats.  I don't believe that the date parsing is 
consistent across ant tasks now, and tasks like CVSTAGDIFF don't parse 
their date parameters at all, but pass them through to the underlying

As date formats are different across locales, and date strings can be
ambiguous (MM-DD-YYYY vs DD-MM-YYYY for example will both "match" the
string '12-12-2000' and there is no way to "dis-ambiguate" them without 
some other input.

This is a sore point with me because for the mess in the system I'm
with now -- there are a list of US specific formats that are each tried 
against the input string until one matches.  This was originally coded
the nested exception handler from hell...

Anyway, I'd suggest be very cautious about introducing general date 
processing in ant that would allow arbitrary date formats, as opposed to

one or two formats per locale, or a single ISO style format 
"yyyy-MM-ddTHH:mm:ss.SSS" (I think that one is legal, I don't have the
in front of me).


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message