I'd like to print the daytime from localhost on port 13
import java.io.*;
import java.net.*;

class a
public static void main(String[] args) throws IOException
Socket localDateSocket = new Socket("localhost", 13);
BufferedReader reponse = new BufferedReader(new InputStreamReader(localDateSocket.getInputStream()));
String date = reponse.readLine();
System.out.println("Date : " + date);

But the result I got is :
Exception in thread "main" java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
at a.main(a.java:8)

I'm on a local network that enables me to go on the net through a proxy (proxy.ec-lyon.fr:3128) that imposes me lots of restrictions. Is this there where the problem is ?