public static void main(String[] args) throws IOException
	{
		
	
		try
		{
		Date ahora = new Date();
		SimpleDateFormat fecha = new SimpleDateFormat ("dd/MM/yyyy HH:mm:ss");
		SimpleDateFormat fecha2 = new SimpleDateFormat("E, dd M yyyy , HH:mm:ss");
		String caca = fecha.format(ahora);
		String caca2 = fecha2.format(ahora);
		
		ServerSocket serverSocket = new ServerSocket(10018);
		Socket clientSocket = serverSocket.accept(); 
		
		PrintWriter out = new PrintWriter(clientSocket.getOutputStream(), true);
		BufferedReader in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
		
       int cont = Integer.parseInt(in.readLine());
		
       if (cont==1)
       {
        System.out.println();
		out.println("La hora es: " + caca);
       }
       if (cont==0)
       {
    	   System.out.println();
   		out.println("La hora es: " + caca2);
       }
		
       serverSocket.close();
	 }
		catch (IOException e)
		{
			System.out.println("mierda");
		}
		
		
	
	
	}