java.lang.Object | +--org.apache.commons.net.DatagramSocketClient | +--org.apache.commons.net.TimeUDPClient
TimeTCPClient
static int | The default time port. |
static long | The number of seconds between 00:00 1 January 1900 and 00:00 1 January 1970. |
Date | getDate(InetAddress host, int port) Retrieves the time from the server and returns a Java Date containing the time converted to the local timezone. |
Date | getDate(InetAddress host) Same as getTime(host, DEFAULT_PORT); ** |
long | getTime(InetAddress host, int port) Retrieves the time from the specified server and port and returns it. |
long | getTime(InetAddress host) Same as getTime(host, DEFAULT_PORT); ** |
public static final int DEFAULT_PORT
public static final long SECONDS_1900_TO_1970
public Date getDate(InetAddress host)
getTime(host, DEFAULT_PORT); **public Date getDate(InetAddress host, int port)
- If an error occurs while fetching the time.public long getTime(InetAddress host)
getTime(host, DEFAULT_PORT); **public long getTime(InetAddress host, int port)
- If an error occurs while retrieving the time.