users@jaxb.java.net

Daylight Savings Time problem and JAXB: HELP!

From: Lawrence, Gabriel <glawrence_at_ucsd.edu>
Date: Wed, 23 Apr 2003 10:03:40 -0700

Does the com.sun.msv.datatype.xsd.DateTimeType really work with dates
after daylight savings time?

I'm having a problem where things are getting serialized and
deserialized on windows 2000 and the time going in is fine and the time
coming out is an hour off... This worked great before the time change,
and is borked now. I had been using the EA version and figured that this
was a good reason to bite the bullet and move up to the production
release, but it doesn't appear to work...

Here's some sample XML generated by JAXB:

<ns3:Conditions NotBefore="2003-04-23T09:47:23.211-08:00"
NotOnOrAfter="2003-04-23T09:52:23.211-08:00">

When this is read in and a new instance of Calendar.getTime() is printed
I get:

Wed Apr 23 09:47:24 PDT 2003

But the serialized results .getTime printed are:

Wed Apr 23 10:47:23 PDT 2003
Wed Apr 23 10:52:23 PDT 2003

Now, obviously the problem is that it seems to think my offset is -08:00
when it should be -07:00 because of the time zone. Is this an operating
system problem or a JAXB one?

As a side note, aside from this the JAXB library has been super and
wonderful tool. Its really helped shave a huge amount of time off the
project I'm currently working on. Thanks so much for putting it
together!

Thanks,
-gabe