You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by tory_mckeag <to...@areva-td.com> on 2008/06/28 01:16:00 UTC

Overriding the default time zone?

Is there a way to override the default time zone that XmlBeans uses when
parsing, so that date and dateTime fields without time zones are assumed to
be in some other time other than the JDK default time zone?  
-- 
View this message in context: http://www.nabble.com/Overriding-the-default-time-zone--tp18165512p18165512.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.


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


Re: Overriding the default time zone?

Posted by Radu Preotiuc-Pietro <ra...@oracle.com>.
In fact, XMLBeans doesn't have a default time zone. Date and DateTime
fields without timezone have a precise meaning in XmlSchema, which is
that they represent that date/datetime in all timezones, and XMLBeans
preserves this meaning.

However, if you do getTime() or other method that triggers time
computation, a timezone has to be assumed. If you want to specify which
one, set the time zone on the calendar before doing anything with it.

Hope this helps,
Radu

On Fri, 2008-06-27 at 16:16 -0700, tory_mckeag wrote:
> Is there a way to override the default time zone that XmlBeans uses when
> parsing, so that date and dateTime fields without time zones are assumed to
> be in some other time other than the JDK default time zone?  


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