xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Fordham" <how...@hotmail.com>
Subject xmlbeans with hr-xml DateTime's
Date Wed, 13 Sep 2006 14:22:42 GMT
Hi User,

I am using xmlbeans to compile my xml with includes mostly hr-xml with a few 
tags of my own. But i am having problems setting the DateTime fields in 
hr-xml. In java I convert a java.util.Date (with time) to a xmlbeans GDDate 
and then from that get the XMLCalendar object from that. code snippet and 
output:-

GDate approved = new GDate(time.getApproved());
          logger.info("Millis from ts going into 
hrxml"+time.getApproved().getTime());
          logger.info("Date  from ts going into hrxml"+time.getApproved());
          logger.info("GDdate seconds going into 
hrxml"+approved.getSecond());
          logger.info("Date GDdate going into hrxml"+approved);
          logger.info("Calendar from GDdate going into 
hrxml"+approved.getCalendar());
          approval.setApprovedDateTime(approved.getCalendar());
          logger.info("Calendar from GDdate after 
setter"+approval.getApprovedDateTime());
          logger.info("Calendar from GDdate after 
setter"+approval.getApprovedDateTime().getTimeInMillis());

logger output follows:-

Millis from ts going into hrxml1156329750000
Date  from ts going into hrxml2006-08-23 11:42:30.0
GDdate seconds going into hrxml30
Date GDdate going into hrxml2006-08-23T11:42:30+01:00
Calendar from GDdate going into hrxml2006-08-23T11:42:30+01:00
Calendar from GDdate after setter2006-08-23+01:00
Calendar from GDdate after setter1156287600000

Can you give me any pointers on why this may be and what i may be doing 
wrong?

Cheers
Craig



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Mime
View raw message