public static Time convertTime(Value value,Calendar calendar){
  if (value == ValueNull.INSTANCE) {
    return null;
  }
  ValueTime t=(ValueTime)value.convertTo(Value.TIME);
  Calendar cal=(Calendar)calendar.clone();
  cal.clear();
  cal.setLenient(true);
  long nanos=t.getNanos();
  long millis=nanos / 1000000;
  nanos-=millis * 1000000;
  long s=millis / 1000;
  millis-=s * 1000;
  long m=s / 60;
  s-=m * 60;
  long h=m / 60;
  m-=h * 60;
  setCalendarFields(cal,1970,1,1,(int)h,(int)m,(int)s,(int)millis);
  long ms=cal.getTimeInMillis();
  return new Time(ms);
}

public static Time convertTime ( Value value , Calendar calendar ) { if ( value == ValueNull . INSTANCE ) { return null ; } ValueTime t = ( ValueTime ) value . convertTo ( Value . TIME ) ; Calendar cal = ( Calendar ) calendar . clone ( ) ; cal . clear ( ) ; cal . setLenient ( true ) ; long nanos = t . getNanos ( ) ; long millis = nanos / 1000000 ; nanos -= millis * 1000000 ; long s = millis / 1000 ; millis -= s * 1000 ; long m = s / 60 ; s -= m * 60 ; long h = m / 60 ; m -= h * 60 ; setCalendarFields ( cal , 1970 , 1 , 1 , ( int ) h , ( int ) m , ( int ) s , ( int ) millis ) ; long ms = cal . getTimeInMillis ( ) ; return new Time ( ms ) ; }
convert the time to the specified time zone .
