// Server for RFC868 time
import java.io.*;
import java.util.*;
import java.text.DateFormat;

public class Server868 extends MTServerBase {
    public void run() {
	try {
 	  OutputStream os = socket.getOutputStream();
	  long tick = new Date().getTime()/1000;
	  byte [] outarray = new byte[4];
         tick+=2208988800L;
         outarray[0]=(byte)((tick & 0xFF000000L)>>24);
         outarray[1]=(byte)((tick & 0xFF0000L)>>16);
         outarray[2]=(byte)((tick & 0xFF00L)>>8);
         outarray[3]=(byte)(tick & 0xFFL);
         os.write(outarray);
	  os.flush();
  	  socket.close();
	  }
	catch (IOException e) {}
     }
    public static void main(String[] args) {
	startServer(37,Server868.class);
    }
}
