Hi Ronald,
This may be helpful to you
http://jibx.sourceforge.net/details/conversions.html
java.util.Date Date.default
Converts instances of java.util.Date to and from the schema dateTime
representation (a text representation like "2000-03-21T01:33:00", with
optional trailing fractional seconds, and difference from UTC). Since schema
doesn't have any concept equivalent to Java time zones, this conversion
always serializes times as UTC values (identified by a trailing "Z"). When
deserializing times which do not include a "Z" or offset from UTC it treats
the values as UTC.
java.sql.Date SqlDate.default
Converts instances of java.sql.Date to and from the schema date
representation (a text representation like "2000-03-21").
use it with format element
http://jibx.sourceforge.net/details/format-element.html
You can use example20 in tutorial for same....
and for example it will be something like following in your binding
defination
<binding>
....
<!-- this will applay global date formating for this binding -->
<format type="java.util.Date"
serializer=" your format class "
deserializer=" your format class "/>
<mapping>
...
</binding>
Hope this will help.
Munjal
On Jan 8, 2008 8:52 AM, Ronald Johnson <[EMAIL PROTECTED]> wrote:
> Hi,
>
> i have the problem that my object that contains a java.util.Date,
> which i have in CET (since i guess the jvm is having it as time
> zone?),
> gets convert to GMT when I use jibx to generate xml.
>
> I would like jibx to convert the date "as it is", and not use any time
> zone conversion.
>
> Is there any way around that, or does anyone have code for a
> serializer that will do it nicely for me?
>
> Since the jibx mapping is used elsewhere in the project to create java
> objects from xml, i would like to keep the behaviour just as before
> apart from the date conversion when creating xml from java object.
>
> Any tips or pointers would be much appreciated,
>
> cheers,
>
> RJ
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
>
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users