Yes, remember that the schema representation of dateTime values and 
variations only represents values in GMT (or in an unspecified zone, 
which is essentially useless for most programming purposes). But if you 
just print out the Time value resulting from unmarshalling you'll use 
the default time zone set on your computer, which is likely different 
from GMT. You can print Date (or Time) values in GMT by using a Calendar 
with the TimeZone set to GMT.

Ugly, but that's the Java date/time handling. If anybody is using Joda 
(http://joda-time.sourceforge.net/) it should be easy to write 
serializer/deserializers to work with the Joda representations instead.

  - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Varghese C V wrote:
> java.sql.Time stores the time in GMT.
> Try the time.toGMTString() to get at the time in your time zone. Since 
> you are getting a +1 difference your system is setup to use a GMT +01.00 
> time zone. Unmarhalling the object should give the correct time.
>
> Varghese C V
>
> Ronald Johnson wrote:
>   
>> I am reading in some xml where I have a time that I map to an
>> attribute of type java.sql.Time.
>> The problem is that the input time will be stored with an additional
>> hour in the object,
>> e.g. 23:45 in the xml will be 00:45 in the object
>> 13:15 in xml will be 14:15 in the object
>>
>> I have no idea why this is, could it have anything to do with daylight
>> saving time?
>> Do I need to create some special serializer/deserializer for time?
>> any tips are appreciated, because I am totally clueless here...
>>
>> in the binding:
>> ...
>> <value name="timeSent" field="timeCreated"/>
>> ...
>>
>> in the class:
>> ...
>> private Time timeCreated;
>> ...
>>
>> my input xml:
>> ...
>> <timeSent>14:42:00</timeSent>
>> ...
>>
>> after parsing the xml, the object contains the time 15:42:00.
>>
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share your
>> opinions on IT & business topics through brief surveys-and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> jibx-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jibx-users
>>
>>   
>>     
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> jibx-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>
>   

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to