package Structure;

import java.util.GregorianCalendar;
import j4d.open.*;

class Examplet {

  /* getServerTime retrieve the time of the 4D Server machine
  */
  public String getServerTime(opProcess process) throws opException {

    String mServerTime;

    try{
      GregorianCalendar mTime = process.GetTime();
      int mHour = mTime.get(Calendar.HOUR);
      int mMinute = mTime.get(Calendar.MINUTE);
      int mSecond = mTime.get(Calendar.SECOND);
      mServerTime = new Integer(mHour).toString() + ":" + new Integer(mMinute).toString()
                    + ":" + new Integer(mSecond).toString();
    }
    catch (opException er){throw er;}

    return mServerTime;
  }

}