users@jaxb.java.net

Re: Problem with Calendar/Date's

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 26 Aug 2003 09:32:22 -0700

Wait, is this really a problem of JAXB or is this a problem of
java.util.Date?

I run a similar code. When I did:

  Calendar start = schedule.getStart();
  print( start.get(Calendar.HOUR_OF_DAY) );

I correctly get 13, but when I did:

  Calendar start = schedule.getStart();
  Date time = start.getTime();
  print( time.getHours() );

I got 14. Note that when I change the time instant to
1999-05-31T12:34:56.052+09:00, those two values are wildly different (12
and 20)


regards,
--
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net