You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2007/03/30 19:56:00 UTC
svn commit: r524207 -
/xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java
Author: mrglavas
Date: Fri Mar 30 10:56:00 2007
New Revision: 524207
URL: http://svn.apache.org/viewvc?view=rev&rev=524207
Log:
Fixing indentation.
Modified:
xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java
Modified: xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java?view=diff&rev=524207&r1=524206&r2=524207
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java Fri Mar 30 10:56:00 2007
@@ -2671,38 +2671,38 @@
* @return TimeZone for this.
*/
public TimeZone getTimeZone(int defaultZoneoffset) {
- TimeZone result = null;
- int zoneoffset = getTimezone();
+ TimeZone result = null;
+ int zoneoffset = getTimezone();
- if (zoneoffset == DatatypeConstants.FIELD_UNDEFINED) {
- zoneoffset = defaultZoneoffset;
- }
- if (zoneoffset == DatatypeConstants.FIELD_UNDEFINED) {
- result = TimeZone.getDefault();
- } else {
- // zoneoffset is in minutes. Convert to custom timezone id format.
- char sign = zoneoffset < 0 ? '-' : '+';
- if (sign == '-') {
- zoneoffset = -zoneoffset;
- }
- int hour = zoneoffset / 60;
- int minutes = zoneoffset - (hour * 60);
-
- // Javadoc for java.util.TimeZone documents max length
- // for customTimezoneId is 8 when optional ':' is not used.
- // Format is
- // "GMT" ('-'|''+') (digit digit?) (digit digit)?
- // hour minutes
- StringBuffer customTimezoneId = new StringBuffer(8);
- customTimezoneId.append("GMT");
- customTimezoneId.append(sign);
- customTimezoneId.append(hour);
- if (minutes != 0) {
- customTimezoneId.append(minutes);
- }
- result = TimeZone.getTimeZone(customTimezoneId.toString());
- }
- return result;
+ if (zoneoffset == DatatypeConstants.FIELD_UNDEFINED) {
+ zoneoffset = defaultZoneoffset;
+ }
+ if (zoneoffset == DatatypeConstants.FIELD_UNDEFINED) {
+ result = TimeZone.getDefault();
+ } else {
+ // zoneoffset is in minutes. Convert to custom timezone id format.
+ char sign = zoneoffset < 0 ? '-' : '+';
+ if (sign == '-') {
+ zoneoffset = -zoneoffset;
+ }
+ int hour = zoneoffset / 60;
+ int minutes = zoneoffset - (hour * 60);
+
+ // Javadoc for java.util.TimeZone documents max length
+ // for customTimezoneId is 8 when optional ':' is not used.
+ // Format is
+ // "GMT" ('-'|''+') (digit digit?) (digit digit)?
+ // hour minutes
+ StringBuffer customTimezoneId = new StringBuffer(8);
+ customTimezoneId.append("GMT");
+ customTimezoneId.append(sign);
+ customTimezoneId.append(hour);
+ if (minutes != 0) {
+ customTimezoneId.append(minutes);
+ }
+ result = TimeZone.getTimeZone(customTimezoneId.toString());
+ }
+ return result;
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org