xml-xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Wyrick <...@wyrick.org>
Subject Re: GDateBuilder question
Date Tue, 23 Sep 2003 16:50:28 GMT
David Bau wrote:

>Out of curiousity, Robert, can you explain to me what is the actual
>difference between Z and +0:00?
>  
>
Technically, there is no difference.  They both represent the same point 
in time.
The original question was perhaps a bit vague in that I intended it to 
be a bug
report.  Calling
    myDateBuilder.setTimeZone(1, 0, 0);
 should work (but doesn't)... But calling.
    myDateBuilder.setTimeZone(1, 0, 30);
does work.

Furthermore, I'd argue that the first argument (tzSign) shouldn't even 
be there!
We should be getting the sign from the tzHour argument.  Otherwise, 
valid code like
    myDateBuilder.setTimeZone(1,tzh,0);
throws an exception if tzh is <= 0.  While I know it easy for the user 
to check tzh
and call setTimeZone() with the "appropriate" tzSign argument, it just 
puts more
burden on the user and opens them up to potential bugs if they never 
tested their
code with a negative offset.

If the tzHour and tzMinute arguments are BOTH zero, then it doesn't 
technically
matter how the time is generated ... HH:MM:SSZ or HH:MM:SS+00:00.  I suppose
that could be some sort of configurable behavior if we really want.  We 
could
keep the tzSign argument around and only generate the Zulu time if 
tzSign is set
to zero, but I think a negative (or zero) tzHour argument should be made to
work.

--
Rob Wyrick



- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Mime
View raw message