As you can see in the image below, I check the date and time from the Internet, everything goes well even with the time zone, the problem is that the name of Month and Day < /> of the week come in English, how could I change them to Spanish and delete that data that says "GMT-0500" .
Here is the code that performs the query of the date and time:
public void GetTime(){
try {
TimeTCPClient client = new TimeTCPClient();
try {
// Set timeout of 60 seconds
client.setDefaultTimeout(60000);
// Connecting to time server
// Other time servers can be found at : http://tf.nist.gov/tf-cgi/servers.cgi#
// Make sure that your program NEVER queries a server more frequently than once every 4 seconds
client.connect("time.nist.gov");
//System.out.println(client.getDate());
Hora.setText("Ultima Actualización el "+client.getDate().toString().trim());
} finally {
client.disconnect();
}
} catch (IOException e) {
e.printStackTrace();
}
}
I hope you can help me, or if you know another method I would also appreciate it. Thanks!