Hi, 

I haven't looked into the sources, but this somehow looks like a timezone
problem. 
Have you tried to use java.sql.Date instead of java.util.Date for the
attribute or Date.default as format?

Just my 2c
--
Dominik

> --- Ursprüngliche Nachricht ---
> Von: "Bornholtz, Tim" <[EMAIL PROTECTED]>
> An: <[email protected]>
> Betreff: [jibx-users] Unmarshaling dates
> Datum: Mon, 5 Dec 2005 16:31:53 -0500
> 
> I'm brand new to JiBX and am trying to get a small sample working and have
> a weird date marshaling problem.  
> 
> My XML looks like this:
> 
> <Disbursement Number="1">
>       <DisbursementDate>2003-07-01</DisbursementDate>
>       <!-- more fields here ... -->
> </Disbursement>
> 
> My Binding XML looks like this:
> 
> <binding>
>       <mapping name="Disbursement" class="Disbursement">
>               <value name="DisbursementDate" field="actualDate"
> format="SqlDate:default"/>
>               <!-- More value tags here to match XML -->
>       </mapping>
> </binding>
> 
> and my java source has the "actualDate" field defined as a java.util.Date.
> 
> When I load the XML into a sample program and run the code:
> System.out.println("Date: " + disb.getActualDate());
> 
> I get the output of 
> Date: 2003-06-30
> 
> 
> But my input date was July 1, 2003.  Whatever I use for a date the output
> is one day earlier.  If I marshal the object back into XML and then write
> that the correct value is back (2003-07-01).
> 
> What am I doing wrong?
> 
> Thanks,
> Tim
> 
> 

-- 
Telefonieren Sie schon oder sparen Sie noch?
NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to