sb.append((char) ('0' + hours / 10)).append((char) ('0' + hours % 10)); sb.append(':'); sb.append((char) ('0' + minutes / 10)).append((char) ('0' + minutes % 10));
if (minutes != 0 || hours != 0) { sb.append(offset >= 0 ? '+' : '-'); sb.append((char) ('0' + hours / 10)); sb.append((char) ('0' + hours % 10)); sb.append(':'); sb.append((char) ('0' + minutes / 10)); sb.append((char) ('0' + minutes % 10)); }
  private String getDefaultDisplayName(boolean dst)  {    int offset = getRawOffset();    if (dst && this instanceof SimpleTimeZone)      {	// ugly, but this is a design failure of the API:	// getDisplayName takes a dst parameter even though	// TimeZone knows nothing about daylight saving offsets.	offset += ((SimpleTimeZone) this).getDSTSavings();      }    StringBuffer sb = new StringBuffer(9);    sb.append("GMT");    sb.append(offset >= 0 ? '+' : '-');    offset = Math.abs(offset) / (1000 * 60);    int hours = offset / 60;    int minutes = offset % 60;    sb.append((char) ('0' + hours / 10)).append((char) ('0' + hours % 10));    sb.append(':');    sb.append((char) ('0' + minutes / 10)).append((char) ('0' + minutes % 10));    return sb.toString();  }