0

Im currently working on the android application, in which i want to get UTC time from the internet and identify the current local time.

Im a newbie to android development, can anyone help me out?

Naveen
  • 1
  • 1
  • 3
  • possible duplicate of [How can I get the current date and time in UTC or GMT in Java?](http://stackoverflow.com/questions/308683/how-can-i-get-the-current-date-and-time-in-utc-or-gmt-in-java) – cw fei Sep 18 '15 at 09:07
  • What do you mean by `get UTC time from the internet` ? from your server? – Rami Sep 18 '15 at 15:18
  • No not from my server,some common place/server which shows the exact time(UTC), from which i can convert it to local timing based on the different locations – Naveen Sep 22 '15 at 05:18
  • i am getting this error. Unable to execute HTTP request: Write error: ssl=0xb79c18d8: I/O error during system call, Connection reset by peer – snehasish Apr 10 '17 at 13:22

1 Answers1

0
SimpleDateFormat dateFormatGmt = new SimpleDateFormat("yyyy-MMM-dd HH:mm:ss");
dateFormatGmt.setTimeZone(TimeZone.getTimeZone("GMT"));

you using code in same java