Hi Munjal,

thanks much for digging up that info.

My problem is that i want the behaviour to be exactly as before (e.g.
accept the various input formats in xml etc), with the only difference
that when converting from
object to xml, there should be no conversion to GMT.

So i wanted to avoid having to write new de/serializers that is doing
that is pretty much the same as the default ones, especially since I
do not want to jeopardize any code that is using this binding to
import xml documents.

I was hoping I could find the default serializer in the source and
modify the actual time conversion, but could not find it.

the real proper solution is probably to use GMT internally througout
our application, unfortunately we cannot make such a massive change in
the application at this stage.

cheers,

RJ


On 1/8/08, Munjal Kansara <[EMAIL PROTECTED]> wrote:
> 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

Reply via email to