// Server for RFC867 time (TCP only)
import java.io.*;
import java.util.*;
import java.text.DateFormat;

public class Server867 extends MTServerBase {
    public void run() {
	try {
 	  OutputStream os = socket.getOutputStream();
	  Date cal = new Date();
	  DateFormat df=DateFormat.getDateTimeInstance(
	       DateFormat.FULL,DateFormat.FULL);
	  df.setTimeZone(TimeZone.getTimeZone("GMT"));
	  String output=df.format(cal)
            +"\r\n";;
	  os.write(output.getBytes("iso8859_1"));
	  os.flush();
  	  socket.close();
	  }
	catch (IOException e) {}
     }
    public static void main(String[] args) {
	startServer(13,Server867.class);
    }
}
