code: private static DateTime readOffset(boolean isPlus, TimeZone timeZone, DateTime dt, int years, int months, int days, int hours, int minutes, int seconds, int milliSeconds,
  	    DateString ds, boolean checkAfterLast, DateTime defaultValue) {
  	// timeZone=ThreadLocalPageContext.getTimeZone(timeZone);
  	if (timeZone == null) return defaultValue;
  	// HOUR
  	int hourLength = ds.getPos();
  	int hour = ds.readDigits();
  	hourLength = ds.getPos() - hourLength;
  	if (hour == -1) return defaultValue;
  
  	// MINUTE
  	int minute = 0;
  	if (!ds.isAfterLast()) {
  	    if (!(ds.fwIfCurrent(':') || ds.fwIfCurrent('.'))) return defaultValue;
  	    minute = ds.readDigits();
  	    if (minute == -1) return defaultValue;
  
  	}
  	else if (hourLength > 2) {
  	    int h = hour / 100;
  	    minute = hour - (h * 100);
  	    hour = h;
  	}
  
  	if (minute > 59) return defaultValue;
  	if (hour > 14 || (hour == 14 && minute > 0)) return defaultValue;
  
  	long offset = hour * 60L * 60L * 1000L;
  	offset += minute * 60 * 1000;
  
  	if (!checkAfterLast || ds.isAfterLast()) {
  	    long time = util.toTime(TimeZoneConstants.UTC, years, months, days, hours, minutes, seconds, milliSeconds, 0);
  
  	    if (isPlus) time -= offset;
  	    else time += offset;
  	    return new DateTimeImpl(time, false);
  	}
  	return defaultValue;
      }
docs: reads a offset definition at the end of a date string
  
  @param timeZone
  @param dt previous parsed date Object
  @param ds DateString to parse
  @param defaultValue
  @return date Object with offset