This seems lazy.

A ColdFusion developer should never have to worry about looking up
Javadocs unless he chooses to use Java objects. It would seem much more
sensible to return a struct with all the information you may need, like
every other ColdFusion function that returns complex data.

But good point about the time zone data. I was just converting them
into ColdFusion Date "objects" using the Locale-specific DateFormat
class (in Java) + LSParseDate, but I might have missed something...


Shane Farmer wrote:
> On 11/6/06, Scott Arbeitman <[EMAIL PROTECTED]> wrote:
> >
> >
> > When calling certain web services, ColdFusion is giving me back
> > java.util.GregorianCalendar instances. Why on Earth would they
> > implement it this way instead of wrapping them in Date/Time objects?
>
>
> Hi Scott,
>
> They would have done it like this to have time zone information included in
> the object. java.util.Date does not contain any details about the timezone
> for which it the date represents. The calendar on the other hand does. If
> you want a Date object, call getTime(). Just keep in mind that this will
> attempt to do timezone conversions for you. If you get some weirdness in the
> times, the conversions are most likely what is messing with them as they are
> a little flaky at times (seems to be a buggy class).
>
> It could be worse... I have been working with a web service where currency
> amounts are just wrapped in a float.
>
> HTH
> Shane
>
> ------=_Part_45262_4513149.1162805354407
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 1312
>
> <br>
> <div><span class="gmail_quote">On 11/6/06, <b class="gmail_sendername">Scott 
> Arbeitman</b> &lt;<a href="mailto:[EMAIL PROTECTED]">[EMAIL 
> PROTECTED]</a>&gt; wrote:</span>
> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 
> 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>When calling certain web services, 
> ColdFusion is giving me back<br>java.util.GregorianCalendar instances. Why on 
> Earth would they
> <br>implement it this way instead of wrapping them in Date/Time 
> objects?</blockquote>
> <div>&nbsp;</div>
> <div>Hi Scott,</div>
> <div>&nbsp;</div>
> <div>They would have done it like this to&nbsp;have time zone information 
> included in the object. java.util.Date does not contain any details about the 
> timezone for which it the date represents. The calendar on the other hand 
> does. If you want a Date object, call getTime(). Just keep in mind that this 
> will attempt to do timezone conversions for you. If you get some weirdness in 
> the times, the conversions are most likely what is messing with them as they 
> are a little flaky at times (seems to be a buggy class).
> </div>
> <div>&nbsp;</div>
> <div>It could be worse... I have been working with a web service where 
> currency amounts are just wrapped in a float.</div>
> <div>&nbsp;</div>
> <div>HTH</div>
> <div>Shane</div><br>&nbsp;</div>
> 
> ------=_Part_45262_4513149.1162805354407--


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to