It is probably a bug. Fortunately, the code in question is already
open-sourced at java.net (yes!), so I'll let you know as soon as I can
make a fix.
Noah Vihinen <noah.vihinen_at_mirror-image.com> wrote:
> I'm either having a jaxb creation-marshaling problem or a
> misunderstanding of the dateTime datatype.
>
> I construct two java Calendar instances - one that's during daylight
> savings time, and one that's not. Both are created with the
> 'America/New_York' timezone. When I run the getTime() methods of these
> Calendar objects and output the result I get the following:
>
> Sat Mar 15 16:35:00 EST 2003
> Fri Apr 18 10:30:00 EDT 2003
>
> Notice one is Eastern Standard Time (-5 of UTC) and the other is
> Eastern Daylight Time (-4 of UTC).
>
> I then put these Calendar objects into my JAXB data tree, and marshal
> them into an XML file. In the file these dates are output as this:
>
> 2003-03-15T16:35:00-05:00
> 2003-04-18T10:30:00-05:00
>
> This surprises me, as the second EDT time still shows an offset of -5,
> and has not accounted for the constant offset by changing the time.
>
> Can anyone tell me what I'm missing?
>
> Thanks!
> Noah
regards,
--
Kohsuke Kawaguchi 408-276-7063 (x17063)
Sun Microsystems kohsuke.kawaguchi_at_sun.com