public String toUiString(){
  StringBuilder sb=new StringBuilder();
  Calendar dateTime=new GregorianCalendar(GMT);
  long localTime=value;
  if (tzShift != null) {
    localTime+=tzShift.longValue() * 60000;
  }
  dateTime.setTimeInMillis(localTime);
  try {
    appendInt(sb,dateTime.get(Calendar.YEAR),4);
    sb.append('-');
    appendInt(sb,dateTime.get(Calendar.MONTH) + 1,2);
    sb.append('-');
    appendInt(sb,dateTime.get(Calendar.DAY_OF_MONTH),2);
    if (!dateOnly) {
      sb.append(' ');
      appendInt(sb,dateTime.get(Calendar.HOUR_OF_DAY),2);
      sb.append(':');
      appendInt(sb,dateTime.get(Calendar.MINUTE),2);
    }
  }
 catch (  ArrayIndexOutOfBoundsException e) {
    throw new RuntimeException(e);
  }
  return sb.toString();
}

public String toUiString ( ) { StringBuilder sb = new StringBuilder ( ) ; Calendar dateTime = new GregorianCalendar ( GMT ) ; long localTime = value ; if ( tzShift != null ) { localTime += tzShift . longValue ( ) * 60000 ; } dateTime . setTimeInMillis ( localTime ) ; try { appendInt ( sb , dateTime . get ( Calendar . YEAR ) , 4 ) ; sb . append ( '-' ) ; appendInt ( sb , dateTime . get ( Calendar . MONTH ) + 1 , 2 ) ; sb . append ( '-' ) ; appendInt ( sb , dateTime . get ( Calendar . DAY_OF_MONTH ) , 2 ) ; if ( ! dateOnly ) { sb . append ( ' ' ) ; appendInt ( sb , dateTime . get ( Calendar . HOUR_OF_DAY ) , 2 ) ; sb . append ( ':' ) ; appendInt ( sb , dateTime . get ( Calendar . MINUTE ) , 2 ) ; } } catch ( ArrayIndexOutOfBoundsException e ) { throw new RuntimeException ( e ) ; } return sb . toString ( ) ; }
formats the value as a human - readable string .
